[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-4841158b26e28e1476eed84c7347c18f11317750@git.kernel.org>
Date: Sat, 18 Jul 2009 21:17:03 GMT
From: tip-bot for Pavel Roskin <proski@....org>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
tglx@...utronix.de, proski@....org
Subject: [tip:timers/urgent] timer: Avoid reading uninitialized data
Commit-ID: 4841158b26e28e1476eed84c7347c18f11317750
Gitweb: http://git.kernel.org/tip/4841158b26e28e1476eed84c7347c18f11317750
Author: Pavel Roskin <proski@....org>
AuthorDate: Sat, 18 Jul 2009 16:46:02 -0400
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sat, 18 Jul 2009 23:11:43 +0200
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@....org>
LKML-Reference: <20090718204602.5191.360.stgit@...roinet.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
kernel/timer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/timer.c b/kernel/timer.c
index 0b36b9e..a7f07d5 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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists