Skip to content

Commit

Permalink
ARM: perf: Check that current->mm is alive before getting user callchain
Browse files Browse the repository at this point in the history
An event may occur when an mm is already released.

As per commit 20afc60
 '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>
  • Loading branch information
Jean Pihet authored and Will Deacon committed Jul 9, 2014
1 parent 037e79a commit a7cc910
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down

0 comments on commit a7cc910

Please sign in to comment.