summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-06 10:35:19 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-06 10:35:19 -0800
commitabb8d6ecbd8f7801c048f6543f79d22d24cead7b (patch)
tree696829e9641d027158b4a86123baf4044fd6eff7 /kernel
parent2acee31cce656cca9e81072c330c1322e1376155 (diff)
parent1aed58e67a6ec1e7a18bfabe8ba6ec2d27c15636 (diff)
downloadlinux-abb8d6ecbd8f7801c048f6543f79d22d24cead7b.tar.bz2
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')
-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);
}
}