OSDN Git Service

timer: Use debugobjects to catch deletion of uninitialized timers
authorChristine Chan <cschan@codeaurora.org>
Tue, 8 Nov 2011 03:48:28 +0000 (19:48 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 23 Nov 2011 17:49:23 +0000 (18:49 +0100)
commitdc4218bd0fe499fce2896f88101ea42dac1f60fc
tree7cca2a9939118f657f9fb557d6da283931e9dc40
parentfb16b8cf0b66386134b09e7b8b7056450272d159
timer: Use debugobjects to catch deletion of uninitialized timers

del_timer_sync() calls debug_object_assert_init() to assert that
a timer has been initialized before calling lock_timer_base().
lock_timer_base() would spin forever on a NULL(uninit-ed) base.
The check is added to del_timer() to prevent silent failure, even
though it would not get stuck in an infinite loop.

[ sboyd@codeaurora.org: Remove WARN, intialize timer function]

Signed-off-by: Christine Chan <cschan@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/1320724108-20788-4-git-send-email-sboyd@codeaurora.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/timer.c