path: root/kernel/notifier.c
diff options
authorAndy Lutomirski <>2015-07-03 12:44:22 -0700
committerIngo Molnar <>2015-07-07 10:59:04 +0200
commite727c7d7a11e109849582e9165d54b254eb181d7 (patch)
treee01abf37efb0e6e67b4cd1f80f554f7929e61ef5 /kernel/notifier.c
parentf9281648ecd5081803bb2da84b9ccb0cf48436cd (diff)
notifiers, RCU: Assert that RCU is watching in notify_die()
Low-level arch entries often call notify_die(), and it's easy for arch code to fail to exit an RCU quiescent state first. Assert that we're not quiescent in notify_die(). Signed-off-by: Andy Lutomirski <> Cc: Andy Lutomirski <> Cc: Borislav Petkov <> Cc: Brian Gerst <> Cc: Denys Vlasenko <> Cc: Denys Vlasenko <> Cc: Frederic Weisbecker <> Cc: H. Peter Anvin <> Cc: Paul E. McKenney <> Cc: Kees Cook <> Cc: Linus Torvalds <> Cc: Oleg Nesterov <> Cc: Peter Zijlstra <> Cc: Rik van Riel <> Cc: Thomas Gleixner <> Cc: Link: Signed-off-by: Ingo Molnar <>
Diffstat (limited to 'kernel/notifier.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/notifier.c b/kernel/notifier.c
index ae9fc7cc360e..980e4330fb59 100644
--- a/kernel/notifier.c
+++ b/kernel/notifier.c
@@ -544,6 +544,8 @@ int notrace notify_die(enum die_val val, const char *str,
.signr = sig,
+ rcu_lockdep_assert(rcu_is_watching(),
+ "notify_die called but RCU thinks we're quiescent");
return atomic_notifier_call_chain(&die_chain, val, &args);