public inbox for trinity@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>,
	linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	trinity@vger.kernel.org
Subject: Re: [bisected] perf: yet another fuzzer triggered crash
Date: Mon, 8 Jul 2013 18:40:02 +0200	[thread overview]
Message-ID: <20130708164002.GB22923@dyad.programming.kicks-ass.net> (raw)
In-Reply-To: <20130708135048.GA1069@krava.brq.redhat.com>

On Mon, Jul 08, 2013 at 03:50:48PM +0200, Jiri Olsa wrote:
> patch below gets rid of the warning, and probably the
> crash as well
> 
> the reason seems to be when HW context is cloned based
> on SW event that happened to get there because of the
> HW leader, which got closed just before (fd[15] event
> in the reproducer)
> 
> and the consequence is that in HW context we access
> SW's cpuctx -> and thus overwriting its task_ctx variable
> any time there's *sched_in routine
> 
> need to check if that does not break anything else ;-)
> 
> jirka
> 
> ---
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 1833bc5..1d1f030 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -7465,7 +7465,7 @@ inherit_task_group(struct perf_event *event, struct task_struct *parent,
>  		 * child.
>  		 */
>  
> -		child_ctx = alloc_perf_context(event->pmu, child);
> +		child_ctx = alloc_perf_context(parent_ctx->pmu, child);
>  		if (!child_ctx)
>  			return -ENOMEM;
>  

Ha! very good catch. Thanks!

  parent reply	other threads:[~2013-07-08 16:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 23:19 perf: yet another fuzzer triggered crash Vince Weaver
2013-06-14  5:04 ` Vince Weaver
2013-06-28 19:35   ` [testcase] " Vince Weaver
2013-06-28 21:07     ` Vince Weaver
2013-07-01  9:07       ` Peter Zijlstra
2013-07-01 15:13         ` Vince Weaver
2013-07-02 20:32           ` Vince Weaver
2013-07-03  3:15             ` [bisected] " Vince Weaver
2013-07-03  7:49               ` Peter Zijlstra
2013-07-08 13:50                 ` Jiri Olsa
2013-07-08 15:55                   ` Vince Weaver
2013-07-08 16:40                   ` Peter Zijlstra [this message]
2013-07-08 16:50                   ` Peter Zijlstra
2013-07-08 17:46                     ` Peter Zijlstra

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=20130708164002.GB22923@dyad.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@ghostprotocols.net \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=trinity@vger.kernel.org \
    --cc=vincent.weaver@maine.edu \
    /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