From: Jiri Olsa <jolsa@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
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 15:50:48 +0200 [thread overview]
Message-ID: <20130708135048.GA1069@krava.brq.redhat.com> (raw)
In-Reply-To: <20130703074929.GE23916@twins.programming.kicks-ass.net>
On Wed, Jul 03, 2013 at 09:49:29AM +0200, Peter Zijlstra wrote:
> On Tue, Jul 02, 2013 at 11:15:59PM -0400, Vince Weaver wrote:
> >
> > OK, I have bisected this problem to the following change:
> >
> > commit 8dc85d547285668e509f86c177bcd4ea055bcaaf
> > Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > Date: Thu Sep 2 16:50:03 2010 +0200
> >
> > perf: Multiple task contexts
> >
> > Provide the infrastructure for multiple task contexts.
> >
>
> Thanks, that narrows down the scope a bit. As it happens I was also
> narrowing down on that particular area so that's good.
>
hi,
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;
next prev parent reply other threads:[~2013-07-08 13:50 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 [this message]
2013-07-08 15:55 ` Vince Weaver
2013-07-08 16:40 ` Peter Zijlstra
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=20130708135048.GA1069@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=acme@ghostprotocols.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.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