From: Peter Zijlstra <peterz@infradead.org>
To: Michael Cree <mcree@orcon.net.nz>
Cc: mingo@redhat.com, dengcheng.zhu@gmail.com,
yanmin_zhang@linux.intel.com, gorcunov@gmail.com,
fweisbec@gmail.com, robert.richter@amd.com, ming.m.lin@intel.com,
tglx@linutronix.de, hpa@zytor.com, paulus@samba.org,
linux-kernel@vger.kernel.org, eranian@googlemail.com,
will.deacon@arm.com, lethal@linux-sh.org, davem@davemloft.net,
mingo@elte.hu, linux-alpha@vger.kernel.org
Subject: Re: [tip:perf/core] perf: Rework the PMU methods
Date: Tue, 14 Sep 2010 16:07:53 +0200 [thread overview]
Message-ID: <1284473273.2275.514.camel@laptop> (raw)
In-Reply-To: <4C8F4A3E.5070603@orcon.net.nz>
On Tue, 2010-09-14 at 22:11 +1200, Michael Cree wrote:
>
> [ 818.575752] Unable to handle kernel paging request at virtual address
> 0000000000000060
> [ 818.575752] perf(4935): Oops 0
> [ 818.575752] pc = [<fffffc000036b8b8>] ra = [<fffffc000036ba3c>] ps
> = 0000 Not tainted
> [ 818.575752] pc is at put_ctx+0x18/0xb0
> [ 818.575752] ra is at free_event+0xec/0x220
> [ 818.575752] v0 = 0000000000000000 t0 = 0000000000000000 t1 =
> 0000000000000002
> [ 818.575752] t2 = 0000000000000000 t3 = 0000000000000000 t4 =
> fffffc000063e4b0
> [ 818.575752] t5 = fffffc0034837000 t6 = fffffc0034837000 t7 =
> fffffc003abe0000
> [ 818.575752] s0 = 0000000000000000 s1 = 0000000000000000 s2 =
> 0000000000000000
> [ 818.575752] s3 = ffffffffffffffff s4 = 0000000000000000 s5 =
> 0000000000000053
> [ 818.575752] s6 = fffffc0034836c00
> [ 818.575752] a0 = 0000000000000000 a1 = fffffc00311a6980 a2 =
> 0000000000000000
> [ 818.575752] a3 = 0000000000000001 a4 = fffffc0000797110 a5 =
> 00000001200055f8
> [ 818.575752] t8 = 0000000000000001 t9 = 00000001200396f4 t10=
> 0000000000000000
> [ 818.575752] t11= 000000000000000a pv = fffffc000031d650 at =
> fffffc000036f8bc
> [ 818.575752] gp = fffffc00007d6e40 sp = fffffc003abe3e18
> [ 818.575752] Disabling lock debugging due to kernel taint
> [ 818.575752] Trace:
> [ 818.575752] [<fffffc000036ba3c>] free_event+0xec/0x220
> [ 818.575752] [<fffffc000036fa24>] SyS_perf_event_open+0x2a4/0x6f0
> [ 818.575752] [<fffffc0000310c24>] entSys+0xa4/0xc0
> [ 818.575752]
> [ 818.575752] Code: 27bb0047 23bdb5a0 23defff0 b53e0008 b75e0000
> 47f00409 <a8500060> 40403121
Does the below cure that?
---
commit 0c67b40872326a5340cab51d79a192a5fbaeb484
Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
Date: Mon Sep 13 11:15:58 2010 +0200
perf: Fix free_event()
With the context rework stuff we can actually end up freeing an event
before it gets attached to a context.
Reported-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index bc46bff..440f9ca 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -2150,7 +2150,9 @@ static void free_event(struct perf_event *event)
if (event->destroy)
event->destroy(event);
- put_ctx(event->ctx);
+ if (event->ctx)
+ put_ctx(event->ctx);
+
call_rcu(&event->rcu_head, free_event_rcu);
}
next prev parent reply other threads:[~2010-09-14 14:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <new-submission>
[not found] ` <tip-a4eaf7f14675cb512d69f0c928055e73d0c6d252@git.kernel.org>
2010-09-11 8:16 ` [tip:perf/core] perf: Rework the PMU methods Michael Cree
2010-09-11 9:40 ` Peter Zijlstra
2010-09-12 5:33 ` Michael Cree
2010-09-12 5:37 ` [PATCH] alpha: Fix HW performance counters to be stopped properly Michael Cree
2010-09-13 12:15 ` [tip:perf/core] perf: Rework the PMU methods Peter Zijlstra
2010-09-13 13:18 ` Peter Zijlstra
2010-09-14 10:11 ` Michael Cree
2010-09-14 14:07 ` Peter Zijlstra [this message]
2010-09-15 20:25 ` Michael Cree
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=1284473273.2275.514.camel@laptop \
--to=peterz@infradead.org \
--cc=davem@davemloft.net \
--cc=dengcheng.zhu@gmail.com \
--cc=eranian@googlemail.com \
--cc=fweisbec@gmail.com \
--cc=gorcunov@gmail.com \
--cc=hpa@zytor.com \
--cc=lethal@linux-sh.org \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcree@orcon.net.nz \
--cc=ming.m.lin@intel.com \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=robert.richter@amd.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.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