From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Greg KH <greg@kroah.com>
Cc: Vince Weaver <vweaver1@eecs.utk.edu>, Ingo Molnar <mingo@elte.hu>,
Paul Mackerras <paulus@samba.org>,
linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
stable <stable@kernel.org>
Subject: Re: [stable] [perf] overflow/perf_count_sw_cpu_clock crashes recent kernels
Date: Wed, 03 Aug 2011 13:49:31 +0200 [thread overview]
Message-ID: <1312372171.1147.302.camel@twins> (raw)
In-Reply-To: <20110802163529.GA1341@kroah.com>
On Tue, 2011-08-02 at 09:35 -0700, Greg KH wrote:
> On Fri, Jul 29, 2011 at 01:59:10PM +0200, Peter Zijlstra wrote:
> > On Thu, 2011-07-28 at 22:05 -0700, Greg KH wrote:
> > >
> > > What is that commit id so it can be properly referenced in the patch
> > > below? And what tree should this patch go into? .39? 3.0? Anything
> > > newer?
> >
> > .32+ in as far as anybody is still maintaining them, if it fails to
> > apply to any of them (quite possible) do tell and I can provide
> > backports etc..
>
> I've applied it to 3.0, and it didn't apply to any older kernel due to
> file movements, so if you could, can you provide a version for
> .32-stable?
---
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
The below patch is for -stable only, upstream has a much larger patch
that contains the below hunk in commit a8b0ca17b80e92faab46ee7179ba9e99ccb61233
Vince found that under certain circumstances software event overflows
go wrong and deadlock. Avoid trying to delete a timer from the timer
callback.
Reported-by: Vince Weaver <vweaver1@eecs.utk.edu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
kernel/perf_event.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 183d437..8f97aea 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -3693,12 +3693,8 @@ static int __perf_event_overflow(struct perf_event *event, int nmi,
if (events && atomic_dec_and_test(&event->event_limit)) {
ret = 1;
event->pending_kill = POLL_HUP;
- if (nmi) {
- event->pending_disable = 1;
- perf_pending_queue(&event->pending,
- perf_pending_event);
- } else
- perf_event_disable(event);
+ event->pending_disable = 1;
+ perf_pending_queue(&event->pending, perf_pending_event);
}
perf_event_output(event, nmi, data, regs);
prev parent reply other threads:[~2011-08-03 11:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-22 16:13 [perf] 3.0 overflow test locks up system Vince Weaver
2011-07-27 18:51 ` [perf] overflow/perf_count_sw_cpu_clock crashes recent kernels Vince Weaver
2011-07-28 1:54 ` Lin Ming
2011-07-28 2:39 ` Lin Ming
2011-07-28 18:47 ` Peter Zijlstra
2011-07-29 5:05 ` [stable] " Greg KH
2011-07-29 11:59 ` Peter Zijlstra
2011-08-02 16:35 ` Greg KH
2011-08-03 11:49 ` 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=1312372171.1147.302.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=stable@kernel.org \
--cc=vweaver1@eecs.utk.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