[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1314710043.5812.1.camel@twins>
Date: Tue, 30 Aug 2011 15:14:03 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Andrey Vagin <avagin@...nvz.org>
Cc: linux-kernel@...r.kernel.org, Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...e.hu>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: [PATCH] x86, perf: check that current->mm alive before getting
user callchain
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@...nvz.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!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists