From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Andrey Vagin <avagin@openvz.org>
Cc: linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
Ingo Molnar <mingo@elte.hu>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Subject: Re: [PATCH] x86, perf: check that current->mm alive before getting user callchain
Date: Tue, 30 Aug 2011 15:14:03 +0200 [thread overview]
Message-ID: <1314710043.5812.1.camel@twins> (raw)
In-Reply-To: <1314693156-24131-1-git-send-email-avagin@openvz.org>
On Tue, 2011-08-30 at 12:32 +0400, Andrey Vagin wrote:
> An event may occurs when mm is already released.
> Signed-off-by: Andrey Vagin <avagin@openvz.org>
> ---
> arch/x86/kernel/cpu/perf_event.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
> index 4ee3abf..cfa62ec 100644
> --- a/arch/x86/kernel/cpu/perf_event.c
> +++ b/arch/x86/kernel/cpu/perf_event.c
> @@ -1900,6 +1900,9 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
>
> perf_callchain_store(entry, regs->ip);
>
> + if (!current->mm)
> + return;
> +
> if (perf_callchain_user32(regs, entry))
> return;
>
Thanks!
prev parent reply other threads:[~2011-08-30 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-30 8:32 [PATCH] x86, perf: check that current->mm alive before getting user callchain Andrey Vagin
2011-08-30 13:14 ` 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=1314710043.5812.1.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=avagin@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/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