mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-12-14 14:25:53 +01:00
dlt-daemon: fix dlt-system.service failed since buffer overflow
dlt-system.service start failed with error: dlt-system[367]: *** buffer overflow detected ***: terminated dlt-system.service: Failed with result 'watchdog'. dlt-system.service: Main process exited, code=dumped, status=6/ABRT dlt-system.service: Watchdog timeout (limit 2s)! Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
b20af98b5a
commit
e4f8e83541
|
|
@ -0,0 +1,40 @@
|
||||||
|
From 94378458d653b1edca86435026909592cbe5e793 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Changqing Li <changqing.li@windriver.com>
|
||||||
|
Date: Fri, 19 Aug 2022 11:12:17 +0800
|
||||||
|
Subject: [PATCH] dlt-system: Fix buffer overflow detection on 32bit targets
|
||||||
|
|
||||||
|
On 32bit target, dlt-system will termiated with error:
|
||||||
|
dlt-system: *** buffer overflow detected ***: terminated
|
||||||
|
|
||||||
|
Upstream-Status: Submitted [https://github.com/COVESA/dlt-daemon/pull/398]
|
||||||
|
|
||||||
|
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||||
|
---
|
||||||
|
src/system/dlt-system-watchdog.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/system/dlt-system-watchdog.c b/src/system/dlt-system-watchdog.c
|
||||||
|
index a2b01de..c0eaa12 100644
|
||||||
|
--- a/src/system/dlt-system-watchdog.c
|
||||||
|
+++ b/src/system/dlt-system-watchdog.c
|
||||||
|
@@ -109,8 +109,8 @@ int register_watchdog_fd(struct pollfd *pollfd, int fdcnt)
|
||||||
|
|
||||||
|
void watchdog_fd_handler(int fd)
|
||||||
|
{
|
||||||
|
- long int timersElapsed = 0;
|
||||||
|
- int r = read(fd, &timersElapsed, 8); // only needed to reset fd event
|
||||||
|
+ uint64_t timersElapsed = 0ULL;
|
||||||
|
+ int r = read(fd, &timersElapsed, 8U); // only needed to reset fd event
|
||||||
|
if(r < 0)
|
||||||
|
DLT_LOG(watchdogContext, DLT_LOG_ERROR, DLT_STRING("Could not reset systemd watchdog. Exit with: "),
|
||||||
|
DLT_STRING(strerror(r)));
|
||||||
|
@@ -120,4 +120,4 @@ void watchdog_fd_handler(int fd)
|
||||||
|
|
||||||
|
DLT_LOG(watchdogContext, DLT_LOG_DEBUG, DLT_STRING("systemd watchdog waited periodic\n"));
|
||||||
|
}
|
||||||
|
-#endif
|
||||||
|
\ No newline at end of file
|
||||||
|
+#endif
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
|
|
@ -18,6 +18,7 @@ SRC_URI = "git://github.com/GENIVI/${BPN}.git;protocol=https;branch=master \
|
||||||
file://0002-Don-t-execute-processes-as-a-specific-user.patch \
|
file://0002-Don-t-execute-processes-as-a-specific-user.patch \
|
||||||
file://0004-Modify-systemd-config-directory.patch \
|
file://0004-Modify-systemd-config-directory.patch \
|
||||||
file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \
|
file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \
|
||||||
|
file://0001-dlt-system-Fix-buffer-overflow-detection-on-32bit-ta.patch \
|
||||||
"
|
"
|
||||||
SRCREV = "6a3bd901d825c7206797e36ea98e10a218f5aad2"
|
SRCREV = "6a3bd901d825c7206797e36ea98e10a218f5aad2"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user