• Steven Rostedt's avatar
    tracing, ring-buffer: add paranoid checks for loops · 818e3dd3
    Steven Rostedt authored
    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: default avatarSteven Rostedt <srostedt@redhat.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    818e3dd3
ring_buffer.c 49.6 KB