• Steven Rostedt's avatar
    function-graph: always initialize task ret_stack · 84047e36
    Steven Rostedt authored
    On creating a new task while running the function graph tracer, if
    we fail to allocate the ret_stack, and then fail the fork, the
    code will free the parent ret_stack. This is because the child
    duplicated the parent and currently points to the parent's ret_stack.
    
    This patch always initializes the task's ret_stack to NULL.
    
    [ Impact: prevent crash of parent on low memory during fork ]
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    84047e36
ftrace.c 57 KB