Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1169864
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Borislav Petkov <bp@alien8.de> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 03/14] notifiers: Assert that RCU is watching in notify_die |
| Date | Mon, 22 Jun 2015 13:40:02 +0200 |
| Message-ID | <pE8f0-2pg-19@gated-at.bofh.it> (permalink) |
| References | <pCNmi-E4-13@gated-at.bofh.it> <pCNvX-Pk-7@gated-at.bofh.it> |
| X-Original-To | Andy Lutomirski <luto@kernel.org> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1434973018; bh=f+GD0Bu+lqHmk7oMDh0ZU8BqI9L/800MK5QGrRqYUsw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=GZpFVZe7kNsPKugTtbL5T2AOdWUyEuwHKGVOfC 1DzkhSJcTMsNo4gsf9nYVvlSE8cq8NbhqQco9845RHOGo5gKIuJ36fAgXNNYwH238CA W08NaY4pY2b4G4o8fbWQKVgB69RghHMZS2tIFMCu3R8WCnamiq6ISU3+krnI/jgQi0= |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1434973018; bh=f+GD0Bu+lqHmk7oMDh0ZU8BqI9L/800MK5QGrRqYUsw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=GZpFVZe7kNsPKugTtbL5T2AOdWUyEuwHKGVOfC 1DzkhSJcTMsNo4gsf9nYVvlSE8cq8NbhqQco9845RHOGo5gKIuJ36fAgXNNYwH238CA W08NaY4pY2b4G4o8fbWQKVgB69RghHMZS2tIFMCu3R8WCnamiq6ISU3+krnI/jgQi0= |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 41 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | x86@kernel.org, linux-kernel@vger.kernel.org, Frédéric Weisbecker <fweisbec@gmail.com>, Rik van Riel <riel@redhat.com>, Oleg Nesterov <oleg@redhat.com>, Denys Vlasenko <vda.linux@googlemail.com>, Kees Cook <keescook@chromium.org>, Brian Gerst <brgerst@gmail.com>, paulmck@linux.vnet.ibm.com |
| X-Original-Date | Mon, 22 Jun 2015 13:36:50 +0200 |
| X-Original-Message-ID | <20150622113649.GB20244@pd.tnic> |
| X-Original-References | <cover.1434654252.git.luto@kernel.org> <c9b5f7d2525e17192a983a31f2f0d8eeec6c4c74.1434654252.git.luto@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1169864 |
Show key headers only | View raw
On Thu, Jun 18, 2015 at 12:08:35PM -0700, Andy Lutomirski wrote:
> 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);
> }
Ok, we're about to die and we will prepend what would be a more
important splat possibly hinting at the problem is with a lockdep splat.
I think we should do the assertion and make the rcu_lockdep splat come
last I but don't see how to do this easily from all the notify_die()
call sites.
Or am I missing something...?
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 03/14] notifiers: Assert that RCU is watching in notify_die Andy Lutomirski <luto@kernel.org> - 2015-06-18 21:20 +0200
Re: [PATCH v2 03/14] notifiers: Assert that RCU is watching in notify_die Borislav Petkov <bp@alien8.de> - 2015-06-22 13:40 +0200
Re: [PATCH v2 03/14] notifiers: Assert that RCU is watching in notify_die Andy Lutomirski <luto@amacapital.net> - 2015-06-22 21:50 +0200
csiph-web