From: Andy Lutomirski <luto@kernel.org>
To: mingo@kernel.org
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Borislav Petkov" <bp@alien8.de>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Paul McKenney" <paulmck@linux.vnet.ibm.com>,
"Andy Lutomirski" <luto@kernel.org>
Subject: [PATCH] notifiers: Assert that RCU is watching in notify_die
Date: Thu, 4 Jun 2015 17:17:06 -0700 [thread overview]
Message-ID: <8a544ca7ba99a9a64ef83df065a75eaefcf2851f.1433463380.git.luto@kernel.org> (raw)
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 <luto@kernel.org>
---
kernel/notifier.c | 2 ++
1 file changed, 2 insertions(+)
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);
}
NOKPROBE_SYMBOL(notify_die);
--
2.4.2
reply other threads:[~2015-06-05 0:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8a544ca7ba99a9a64ef83df065a75eaefcf2851f.1433463380.git.luto@kernel.org \
--to=luto@kernel.org \
--cc=bp@alien8.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).