summaryrefslogtreecommitdiffstats
path: root/kernel/events
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-06 19:35:19 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-06 19:35:19 +0100
commitabb8d6ecbd8f7801c048f6543f79d22d24cead7b (patch)
tree696829e9641d027158b4a86123baf4044fd6eff7 /kernel/events
parentMerge tag 'sound-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/t... (diff)
parentUprobes: Fix kernel oops with delayed_uprobe_remove() (diff)
downloadlinux-abb8d6ecbd8f7801c048f6543f79d22d24cead7b.tar.xz
linux-abb8d6ecbd8f7801c048f6543f79d22d24cead7b.zip
Merge tag 'trace-v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fix from Steven Rostedt: "This is a single commit that fixes a bug in uprobes SDT code due to a missing mutex protection" * tag 'trace-v4.20-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: Uprobes: Fix kernel oops with delayed_uprobe_remove()
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/uprobes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 322e97bbb437..abbd8da9ac21 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -572,7 +572,9 @@ static void put_uprobe(struct uprobe *uprobe)
* gets called, we don't get a chance to remove uprobe from
* delayed_uprobe_list from remove_breakpoint(). Do it here.
*/
+ mutex_lock(&delayed_uprobe_lock);
delayed_uprobe_remove(uprobe, NULL);
+ mutex_unlock(&delayed_uprobe_lock);
kfree(uprobe);
}
}