From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: paulmck@linux.vnet.ibm.com
Cc: paulus@samba.org, mingo@redhat.com, acme@ghostprotocols.net,
linux-kernel@vger.kernel.org, ajax@redhat.com, gusld@br.ibm.com
Subject: Re: [PATCH] events: Protect access via task_subsys_state_check()
Date: Mon, 22 Apr 2013 10:25:20 +0200 [thread overview]
Message-ID: <1366619120.2721.0.camel@laptop> (raw)
In-Reply-To: <20130419190124.GA8638@linux.vnet.ibm.com>
On Fri, 2013-04-19 at 12:01 -0700, Paul E. McKenney wrote:
> The following RCU splat indicates lack of RCU protection:
...
> This commit therefore adds the required RCU read-side critical section to
> perf_event_comm().
>
> Reported-by: Adam Jackson <ajax@redhat.com>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Tested-by: Gustavo Luiz Duarte <gusld@br.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index b0cd865..8db9551 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -4593,6 +4593,7 @@ void perf_event_comm(struct task_struct *task)
> struct perf_event_context *ctx;
> int ctxn;
>
> + rcu_read_lock();
> for_each_task_context_nr(ctxn) {
> ctx = task->perf_event_ctxp[ctxn];
> if (!ctx)
> @@ -4600,6 +4601,7 @@ void perf_event_comm(struct task_struct *task)
>
> perf_event_enable_on_exec(ctx);
> }
> + rcu_read_unlock();
>
> if (!atomic_read(&nr_comm_events))
> return;
>
prev parent reply other threads:[~2013-04-22 8:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 19:01 [PATCH] events: Protect access via task_subsys_state_check() Paul E. McKenney
2013-04-21 12:51 ` [tip:perf/urgent] " tip-bot for Paul E. McKenney
2013-04-22 8:25 ` Peter Zijlstra [this message]
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=1366619120.2721.0.camel@laptop \
--to=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=ajax@redhat.com \
--cc=gusld@br.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=paulus@samba.org \
/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