• Steven Rostedt's avatar
    tracing: Prevent kernel oops with corrupted buffer · 74bf4076
    Steven Rostedt authored
    If the contents of the ftrace ring buffer gets corrupted and the trace
    file is read, it could create a kernel oops (usualy just killing the user
    task thread). This is caused by the checking of the pid in the buffer.
    If the pid is negative, it still references the cmdline cache array,
    which could point to an invalid address.
    
    The simple fix is to test for negative PIDs.
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    74bf4076
trace.c 99.6 KB