From: Pavel Roskin Date: Sat, 18 Jul 2009 20:46:02 +0000 (-0400) Subject: timer: Avoid reading uninitialized data X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4841158b26e28e1476eed84c7347c18f11317750;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git timer: Avoid reading uninitialized data timer->expires may be uninitialized, so check timer_pending() before touching timer->expires to pacify kmemcheck. Signed-off-by: Pavel Roskin LKML-Reference: <20090718204602.5191.360.stgit@mj.roinet.com> Signed-off-by: Thomas Gleixner --- diff --git a/kernel/timer.c b/kernel/timer.c index 0b36b9e5cc8b..a7f07d5a6241 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -714,7 +714,7 @@ int mod_timer(struct timer_list *timer, unsigned long expires) * networking code - if the timer is re-modified * to be the same thing then just return: */ - if (timer->expires == expires && timer_pending(timer)) + if (timer_pending(timer) && timer->expires == expires) return 1; return __mod_timer(timer, expires, false, TIMER_NOT_PINNED);