Re: [PATCH 1/3] context_tracking: Protect against recursion

From: Rik van Riel
Date: Thu Apr 02 2015 - 14:01:43 EST

On 04/02/2015 01:39 PM, Frederic Weisbecker wrote:
> Context tracking recursion can happen when an exception triggers in the
> middle of a call to a context tracking probe.
> This special case can be caused by vmalloc faults. If an access to a
> memory area allocated by vmalloc happens in the middle of
> context_tracking_enter(), we may run into an endless fault loop because
> the exception in turn calls context_tracking_enter() which faults on
> the same vmalloc'ed memory, triggering an exception again, etc...
> Some rare crashes have been reported so lets protect against this with
> a recursion counter.
> Reported-by: Dave Jones <davej@xxxxxxxxxx>
> Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Rik van Riel <riel@xxxxxxxxxx>
> Cc: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Dave Jones <davej@xxxxxxxxxx>
> Cc: Oleg Nesterov <oleg@xxxxxxxxxx>

Reviewed-by: Rik van Riel <riel@xxxxxxxxxx>

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at