Re: [PATCH -v3] ring-buffer: add paranoid checks for loops
From: Ingo Molnar
Date: Mon Nov 03 2008 - 05:10:57 EST
* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> [
> Changes from v2:
>
> Applied Ingo's comments:
>
> Rephrased one of the comments.
>
> Renamed the "paranoid" variable into "nr_loops".
> ]
>
> While writing a new tracer, I had a bug where I caused the ring-buffer
> to recurse in a bad way. The bug was with the tracer I was writing
> and not the ring-buffer itself. But it took a long time to find the
> problem.
>
> This patch adds paranoid checks into the ring-buffer infrastructure
> that will catch bugs of this nature.
>
> Note: I put the bug back in the tracer and this patch showed the error
> nicely and prevented the lockup.
>
> Signed-off-by: Steven Rostedt <srostedt@xxxxxxxxxx>
> ---
> kernel/trace/ring_buffer.c | 56 +++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 56 insertions(+)
applied to tip/tracing/urgent, thanks Steve!
Ingo
--
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/