diff options
author | Pavel Roskin | 2009-07-18 22:46:02 +0200 |
---|---|---|
committer | Thomas Gleixner | 2009-07-18 23:11:43 +0200 |
commit | 4841158b26e28e1476eed84c7347c18f11317750 (patch) | |
tree | ca701f45ebf6088ab45f76e68f0ef74a03654532 /kernel/timer.c | |
parent | Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/air... (diff) | |
download | kernel-qcow2-linux-4841158b26e28e1476eed84c7347c18f11317750.tar.gz kernel-qcow2-linux-4841158b26e28e1476eed84c7347c18f11317750.tar.xz kernel-qcow2-linux-4841158b26e28e1476eed84c7347c18f11317750.zip |
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 <proski@gnu.org>
LKML-Reference: <20090718204602.5191.360.stgit@mj.roinet.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/timer.c')
-rw-r--r-- | kernel/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |