|author||Mathieu Desnoyers <firstname.lastname@example.org>||2010-04-17 08:48:42 -0400|
|committer||Paul E. McKenney <email@example.com>||2010-06-14 16:37:26 -0700|
tree/tiny rcu: Add debug RCU head objects
Helps finding racy users of call_rcu(), which results in hangs because list entries are overwritten and/or skipped. Changelog since v4: - Bissectability is now OK - Now generate a WARN_ON_ONCE() for non-initialized rcu_head passed to call_rcu(). Statically initialized objects are detected with object_is_static(). - Rename rcu_head_init_on_stack to init_rcu_head_on_stack. - Remove init_rcu_head() completely. Changelog since v3: - Include comments from Lai Jiangshan This new patch version is based on the debugobjects with the newly introduced "active state" tracker. Non-initialized entries are all considered as "statically initialized". An activation fixup (triggered by call_rcu()) takes care of performing the debug object initialization without issuing any warning. Since we cannot increase the size of struct rcu_head, I don't see much room to put an identifier for statically initialized rcu_head structures. So for now, we have to live without "activation without explicit init" detection. But the main purpose of this debug option is to detect double-activations (double call_rcu() use of a rcu_head before the callback is executed), which is correctly addressed here. This also detects potential internal RCU callback corruption, which would cause the callbacks to be executed twice. Signed-off-by: Mathieu Desnoyers <firstname.lastname@example.org> CC: David S. Miller <email@example.com> CC: "Paul E. McKenney" <firstname.lastname@example.org> CC: email@example.com CC: firstname.lastname@example.org CC: email@example.com CC: firstname.lastname@example.org CC: email@example.com CC: firstname.lastname@example.org CC: email@example.com CC: firstname.lastname@example.org CC: email@example.com CC: firstname.lastname@example.org CC: Valdis.Kletnieks@vt.edu CC: email@example.com CC: firstname.lastname@example.org CC: Alexey Dobriyan <email@example.com> Signed-off-by: Paul E. McKenney <firstname.lastname@example.org> Reviewed-by: Lai Jiangshan <email@example.com>
Diffstat (limited to 'lib/Kconfig.debug')
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index e722e9d6222..142faa2ec66 100644
@@ -307,6 +307,12 @@ config DEBUG_OBJECTS_WORK
work queue routines to track the life time of work objects and
validate the work operations.
+ bool "Debug RCU callbacks objects"
+ depends on DEBUG_OBJECTS && PREEMPT
+ Enable this to turn on debugging of RCU list heads (call_rcu() usage).
int "debug_objects bootup default value (0-1)"
range 0 1