]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/uprobes: Add busy check when cleanup all uprobes
authorMasami Hiramatsu <mhiramat@kernel.org>
Mon, 5 Nov 2018 09:00:15 +0000 (18:00 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sun, 9 Dec 2018 01:54:08 +0000 (20:54 -0500)
commit9782e69cb9ad7022ddfb40c63d214e423b1a0d6f
tree8af751c66d53ad37859ac7fce40b1aa04fc14fd1
parent17af1f34a7a2c8e18df0915d3819e9651bdb4c30
tracing/uprobes: Add busy check when cleanup all uprobes

Add a busy check loop in cleanup_all_probes() before
trying to remove all events in uprobe_events, the same way
that kprobe_events does.

Without this change, writing null to uprobe_events will
try to remove events but if one of them is enabled, it will
stop there leaving some events cleared and others not clceared.

With this change, writing null to uprobe_events makes
sure all events are not enabled before removing events.
So, it clears all events, or returns an error (-EBUSY)
with keeping all events.

Link: http://lkml.kernel.org/r/154140841557.17322.12653952888762532401.stgit@devbox
Reviewed-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Tested-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_uprobe.c