projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78af08d
)
timer: Avoid reading uninitialized data
author
Pavel Roskin
<
[email protected]
>
Sat, 18 Jul 2009 20:46:02 +0000
(16:46 -0400)
committer
Thomas Gleixner
<
[email protected]
>
Sat, 18 Jul 2009 21:11:43 +0000
(23:11 +0200)
timer->expires may be uninitialized, so check timer_pending() before
touching timer->expires to pacify kmemcheck.
Signed-off-by: Pavel Roskin <
[email protected]
>
LKML-Reference: <
20090718204602
[email protected]
>
Signed-off-by: Thomas Gleixner <
[email protected]
>
kernel/timer.c
patch
|
blob
|
history
diff --git
a/kernel/timer.c
b/kernel/timer.c
index 0b36b9e5cc8b4e27f6adf89de403885cfe8a6687..a7f07d5a6241d882af4466ec3280a89f2681e8c9 100644
(file)
--- 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);