tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()
authorOleg Nesterov <[email protected]>
Fri, 27 Jun 2014 17:01:46 +0000 (19:01 +0200)
committerSteven Rostedt <[email protected]>
Mon, 30 Jun 2014 17:22:33 +0000 (13:22 -0400)
commitfb6bab6a5ad46d00b5ffa22268f21df1cd7c59df
treecf20fd01e563ee6a4b659d30ab48de0fb015f584
parentf786106e8081bbec57053fec7fcf25dc25d02144
tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

The usage of uprobe_buffer_enable() added by dcad1a20 is very wrong,

1. uprobe_buffer_enable() and uprobe_buffer_disable() are not balanced,
   _enable() should be called only if !enabled.

2. If uprobe_buffer_enable() fails probe_event_enable() should clear
   tp.flags and free event_file_link.

3. If uprobe_register() fails it should do uprobe_buffer_disable().

Link: http://lkml.kernel.org/p/[email protected]
Acked-by: Namhyung Kim <[email protected]>
Acked-by: Srikar Dronamraju <[email protected]>
Reviewed-by: Masami Hiramatsu <[email protected]>
Fixes: dcad1a204f72 "tracing/uprobes: Fetch args before reserving a ring buffer"
Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
kernel/trace/trace_uprobe.c