debugobjects: Extend to assert that an object is initialized
authorChristine Chan <cschan@codeaurora.org>
Tue, 8 Nov 2011 03:48:27 +0000 (19:48 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 23 Nov 2011 17:49:22 +0000 (18:49 +0100)
commitb84d435cc228e87951f3bbabf6cc4a5f25d5fb16
tree4a43e7224c49f1ef9b3f25d38a80c29c2692b8dc
parentfeac18dda25134005909e7770c77464e65608bd8
debugobjects: Extend to assert that an object is initialized

Calling del_timer_sync() on an uninitialized timer leads to a
never ending loop in lock_timer_base() that spins checking for a
non-NULL timer base. Add an assertion to debugobjects to catch
usage of uninitialized objects so that we can initialize timers
in the del_timer_sync() path before it calls lock_timer_base().

[ sboyd@codeaurora.org: Clarify commit message ]

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-3-git-send-email-sboyd@codeaurora.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Documentation/DocBook/debugobjects.tmpl
include/linux/debugobjects.h
lib/debugobjects.c