Re: [PATCH,RFC] perf: panic due to inclied cpu context task_ctxvalue

From: Oleg Nesterov
Date: Wed Mar 30 2011 - 17:36:54 EST


On 03/30, Peter Zijlstra wrote:
>
> Anyway how about we do the partial revert below that should get us back
> to a working kernel and is a nice small patch to send -stable wards.
>
> After that we can try and be clever with clearing ->task_ctx from things
> like remove_from_context and the like.
>
> ---
> include/linux/perf_event.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
> index 311b4dc..04d75a8 100644
> --- a/include/linux/perf_event.h
> +++ b/include/linux/perf_event.h
> @@ -1086,7 +1086,7 @@ void perf_event_task_sched_out(struct task_struct *task, struct task_struct *nex
> {
> perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0);
>
> - COND_STMT(&perf_sched_events, __perf_event_task_sched_out(task, next));
> + __perf_event_task_sched_out(task, next);
> }

I agree completely. We need the simple (and suitable for stable) fix first.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/