From a3c91b26d62eb2ae8bd7de2b4470022cdac81f1d Mon Sep 17 00:00:00 2001 From: INSUN PYO Date: Tue, 19 Jul 2016 13:29:08 +0900 Subject: [PATCH] [PATCH 1/2] kdbus: Fix the overflow for timeout calculation The maximum value of unsigned long is 4294967295 which is too small for storing nano second. It makes the overflow in calculation. Use LLU instead of LU for timeout calculation. ====================================================================== Subject: [PATCH 2/2] kdbus: adjust the default value for timeout to 50 sec This definition is used by the default value for timeout value. But in the other places, 50 sec is used by default value for timeout, instead of using it. Let's align it with the others Signed-off-by: INSUN PYO Change-Id: Idddaf3f095ad47206f8b6ac11bc46c43c3bc8bd3 --- dbus/dbus-transport-kdbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbus/dbus-transport-kdbus.c b/dbus/dbus-transport-kdbus.c index 63e258d..759c3d7 100644 --- a/dbus/dbus-transport-kdbus.c +++ b/dbus/dbus-transport-kdbus.c @@ -102,7 +102,7 @@ int debug = -1; ((uint8_t *)(iter) < (uint8_t *)(first) + (_size)) && \ ((uint8_t *)(iter) >= (uint8_t *)(first)); \ iter = (void*)(((uint8_t *)iter) + ALIGN8((iter)->size))) -#define KDBUS_DEFAULT_TIMEOUT_NS 5000000000LU +#define KDBUS_DEFAULT_TIMEOUT_NS 50000000000LLU /** * @defgroup DBusTransportKdbus DBusTransport implementations for kdbus -- 2.7.4