diff options
author | Jean Pihet <jean.pihet@linaro.org> | 2014-07-07 15:45:08 +0200 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2014-07-09 16:05:24 +0200 |
commit | a7cc91001e36a4a4152c3ada6c8fe38adc5badbc (patch) | |
tree | 32d10331079614332cf6cc465cd36d6872d873d5 /arch/arm | |
parent | arm: perf: krait: stop using singleton PMU (diff) | |
download | linux-a7cc91001e36a4a4152c3ada6c8fe38adc5badbc.tar.xz linux-a7cc91001e36a4a4152c3ada6c8fe38adc5badbc.zip |
ARM: perf: Check that current->mm is alive before getting user callchain
An event may occur when an mm is already released.
As per commit 20afc60f892d285fde179ead4b24e6a7938c2f1b
'x86, perf: Check that current->mm is alive before getting user callchain'
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/perf_event.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 4238bcba9d60..6493c4c97d48 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@ -590,6 +590,10 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) } perf_callchain_store(entry, regs->ARM_pc); + + if (!current->mm) + return; + tail = (struct frame_tail __user *)regs->ARM_fp - 1; while ((entry->nr < PERF_MAX_STACK_DEPTH) && |