Re: perf: WARNING: kernel/events/core.c:4893 perf_mmap_close

From: Alexander Shishkin
Date: Wed Aug 24 2016 - 07:45:55 EST


Will Deacon <will.deacon@xxxxxxx> writes:

> A little bit of digging suggests that the preempt count isn't balanced
> across the call to perf_pmu_output_stop from perf_mmap_close. Further
> digging revealed the unbalanced get_cpu_ptr in __perf_pmu_output_stop.
> Fix below!

Oh gee, that's embarrassing. Thanks!

> This patch uses this_cpu_ptr instead of get_cpu_ptr, since preemption is
> already disabled by the caller.
>
> Fixes: 95ff4ca26c49 ("perf/core: Free AUX pages in unmap path")
> Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Signed-off-by: Will Deacon <will.deacon@xxxxxxx>

Reviewed-by: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>

Regards,
--
Alex