• Li Zefan's avatar
    tracing: Fix stack tracer sysctl handling · a32c7765
    Li Zefan authored
    This made my machine completely frozen:
    
      # echo 1 > /proc/sys/kernel/stack_tracer_enabled
      # echo 2 > /proc/sys/kernel/stack_tracer_enabled
    
    The cause is register_ftrace_function() was called twice.
    
    Also fix ftrace_enabled sysctl, though seems nothing bad happened
    as I tested it.
    Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    LKML-Reference: <4A448D17.9010305@cn.fujitsu.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    a32c7765
trace_stack.c 7.51 KB