• S
    tracing: Prevent kernel oops with corrupted buffer · 74bf4076
    Steven Rostedt 提交于
    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: NSteven Rostedt <rostedt@goodmis.org>
    74bf4076
trace.c 99.6 KB