Re: [PATCH] perf: Fix bad software/trace event recursion counting

Peter Zijlstra
2009-11-24T20:49:12Z

On Tue, 2009-11-24 at 20:38 +0100, Frederic Weisbecker wrote:

> diff --git a/kernel/perf_event.c b/kernel/perf_event.c
> index accfd7b..35df94e 100644
> --- a/kernel/perf_event.c
> +++ b/kernel/perf_event.c
> @@ -3914,7 +3914,7 @@ void perf_swevent_put_recursion_context(int rctx)
> {
> struct perf_cpu_context *cpuctx = &__get_cpu_var(perf_cpu_context);
> barrier();
> - cpuctx->recursion[rctx]++;
> + cpuctx->recursion[rctx]--;
> put_cpu_var(perf_cpu_context);
> }

D'0h!