From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756922AbbGGKvu (ORCPT ); Tue, 7 Jul 2015 06:51:50 -0400 Received: from terminus.zytor.com ([198.137.202.10]:59921 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756899AbbGGKvb (ORCPT ); Tue, 7 Jul 2015 06:51:31 -0400 Date: Tue, 7 Jul 2015 03:50:27 -0700 From: tip-bot for Andy Lutomirski Message-ID: Cc: oleg@redhat.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, mingo@kernel.org, dvlasenk@redhat.com, luto@kernel.org, hpa@zytor.com, brgerst@gmail.com, keescook@chromium.org, peterz@infradead.org, paulmck@linux.vnet.ibm.com, bp@alien8.de, riel@redhat.com, fweisbec@gmail.com, luto@amacapital.net, vda.linux@googlemail.com Reply-To: dvlasenk@redhat.com, luto@kernel.org, tglx@linutronix.de, oleg@redhat.com, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, mingo@kernel.org, fweisbec@gmail.com, luto@amacapital.net, vda.linux@googlemail.com, hpa@zytor.com, paulmck@linux.vnet.ibm.com, peterz@infradead.org, keescook@chromium.org, brgerst@gmail.com, bp@alien8.de, riel@redhat.com In-Reply-To: <1f5fe6c23d5b432a23267102f2d72b787d80fdd8.1435952415.git.luto@kernel.org> References: <1f5fe6c23d5b432a23267102f2d72b787d80fdd8.1435952415.git.luto@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] notifiers, RCU: Assert that RCU is watching in notify_die() Git-Commit-ID: e727c7d7a11e109849582e9165d54b254eb181d7 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e727c7d7a11e109849582e9165d54b254eb181d7 Gitweb: http://git.kernel.org/tip/e727c7d7a11e109849582e9165d54b254eb181d7 Author: Andy Lutomirski AuthorDate: Fri, 3 Jul 2015 12:44:22 -0700 Committer: Ingo Molnar CommitDate: Tue, 7 Jul 2015 10:59:04 +0200 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: paulmck@linux.vnet.ibm.com Link: http://lkml.kernel.org/r/1f5fe6c23d5b432a23267102f2d72b787d80fdd8.1435952415.git.luto@kernel.org Signed-off-by: Ingo Molnar --- kernel/notifier.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/notifier.c b/kernel/notifier.c index ae9fc7c..980e433 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);