summaryrefslogtreecommitdiffstats
path: root/kernel/trace/ftrace.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-07-03 23:33:51 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-29 09:47:34 -0700
commit396dd500521287215d836b84b2ae61cd9163bba5 (patch)
treeffcc34bf6cac2589231fa653e64a6ad80b246527 /kernel/trace/ftrace.c
parent428fbcf9d5d654526a73229d97e76d5d7ac47190 (diff)
downloadlinux-stable-396dd500521287215d836b84b2ae61cd9163bba5.tar.gz
linux-stable-396dd500521287215d836b84b2ae61cd9163bba5.tar.bz2
linux-stable-396dd500521287215d836b84b2ae61cd9163bba5.zip
tracing/uprobes: Fail to unregister if probe event files are in use
commit c6c2401d8bbaf9edc189b4c35a8cb2780b8b988e upstream. Uprobes suffer the same problem that kprobes have. There's a race between writing to the "enable" file and removing the probe. The probe checks for it being in use and if it is not, goes about deleting the probe and the event that represents it. But the problem with that is, after it checks if it is in use it can be enabled, and the deletion of the event (access to the probe) will fail, as it is in use. But the uprobe will still be deleted. This is a problem as the event can reference the uprobe that was deleted. The fix is to remove the event first, and check to make sure the event removal succeeds. Then it is safe to remove the probe. When the event exists, either ftrace or perf can enable the probe and prevent the event from being removed. Link: http://lkml.kernel.org/r/20130704034038.991525256@goodmis.org Acked-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/trace/ftrace.c')
0 files changed, 0 insertions, 0 deletions