Re: [PATCH] sched/clock: prevent tracing recursion in sched_clock_cpu()

From: Peter Zijlstra
Date: Thu Mar 06 2014 - 05:51:47 EST


On Thu, Mar 06, 2014 at 02:25:28PM +0900, Fernando Luis Vázquez Cao wrote:
> From: Fernando Luis Vazquez Cao <fernando@xxxxxxxxxxxxx>
>
> Prevent tracing of preempt_disable/enable() in sched_clock_cpu().
> When CONFIG_DEBUG_PREEMPT is enabled, preempt_disable/enable() are
> traced and this causes trace_clock() users (and probably others) to
> go into an infinite recursion. Systems with a stable sched_clock()
> are not affected.
>
> This problem is similar to that fixed by upstream commit 95ef1e52922
> ("KVM guest: prevent tracing recursion with kvmclock").
>
> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> Signed-off-by: Fernando Luis Vazquez Cao <fernando@xxxxxxxxxxxxx>

Thanks!
--
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/