From: Peter Zijlstra <peterz@infradead.org>
To: Chen LinX <linx.z.chen@intel.com>
Cc: paulus@samba.org, mingo@redhat.com, acme@ghostprotocols.net,
linux-kernel@vger.kernel.org, yanmin_zhang@linux.intel.com,
Yanmin Zhang <yanmin.zhang@intel.com>
Subject: Re: [PATCH] perf: Don't enable the perf_event without in PERF_ATTACH_CONTEXT status
Date: Mon, 14 Jul 2014 14:15:25 +0200 [thread overview]
Message-ID: <20140714121525.GX19379@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1404358598-19186-1-git-send-email-linx.z.chen@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]
On Thu, Jul 03, 2014 at 11:36:38AM +0800, Chen LinX wrote:
> From: "Chen LinX" <linx.z.chen@intel.com>
>
> when do cpu hotplug test and run below perf test together, pmu may access freed perf_event
>
> while true;
> do
> perf record -a -g -f sleep 10
> rm perf.*
> done
>
> the scenario is that when cpu offline firstly, the 'perf_cpu_notify' will disable event on the
> pmu and remove it from the context list. after cpu online, the perf app may enable the event
> that without linked in context list again. when cpu offine the second time, the 'perf_cpu_notify'
> can't disable event on the pmu as the event doesn't link to context list. the perf app may free
> this event later(the free procedure try to disable event on the pmu but as the cpu is offline,
> the 'cpu_function_call(event->cpu, __perf_remove_from_context, event)' is failed). then after
> cpu online again, pmu will access freed perf_event and hit panic.
What?
(also, teach your MUA to wrap text at 78 chars)
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-07-14 12:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 3:36 [PATCH] perf: Don't enable the perf_event without in PERF_ATTACH_CONTEXT status Chen LinX
2014-07-14 12:15 ` Peter Zijlstra [this message]
2014-07-14 13:27 ` Peter Zijlstra
2014-07-15 8:56 ` Zhang, Yanmin
2014-07-15 9:58 ` 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=20140714121525.GX19379@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@ghostprotocols.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linx.z.chen@intel.com \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=yanmin.zhang@intel.com \
--cc=yanmin_zhang@linux.intel.com \
/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