Skip to contentSkip to conversation

notifiers: Assert that RCU is watching in notify_die

PATCH New Andy Lutomirski 1 participant 1 message Jun 5, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 notifiers: 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.

---
 kernel/notifier.c | 2 ++
 1 file changed, 2 insertions(+)
kernel/notifier.c +2 -0
index ae9fc7cc360e..980e4330fb59 100644
@@ -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);
 }
 NOKPROBE_SYMBOL(notify_die);
Signature · 1 line
2.4.2