summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-01-12 20:57:45 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2025-01-12 20:57:45 +0100
commita603abe345d6301f04dc2ceb5fbdaa19e4c8f7da (patch)
tree223163c1186ffe48025526a327f13093103acc39 /kernel
parentMerge tag 'x86_urgent_for_v6.13_rc7' of git://git.kernel.org/pub/scm/linux/ke... (diff)
parentuprobes: Fix race in uprobe_free_utask (diff)
downloadlinux-a603abe345d6301f04dc2ceb5fbdaa19e4c8f7da.tar.xz
linux-a603abe345d6301f04dc2ceb5fbdaa19e4c8f7da.zip
Merge tag 'perf_urgent_for_v6.13_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fix from Borislav Petkov: - Fix a #GP in the perf user callchain code caused by a race between uprobe freeing the task and the bpf profiler unwinding the task's user stack * tag 'perf_urgent_for_v6.13_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: uprobes: Fix race in uprobe_free_utask
Diffstat (limited to 'kernel')
-rw-r--r--kernel/events/uprobes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index fa04b14a7d72..5d71ef85420c 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1915,6 +1915,7 @@ void uprobe_free_utask(struct task_struct *t)
if (!utask)
return;
+ t->utask = NULL;
WARN_ON_ONCE(utask->active_uprobe || utask->xol_vaddr);
timer_delete_sync(&utask->ri_timer);
@@ -1924,7 +1925,6 @@ void uprobe_free_utask(struct task_struct *t)
ri = free_ret_instance(ri, true /* cleanup_hprobe */);
kfree(utask);
- t->utask = NULL;
}
#define RI_TIMER_PERIOD (HZ / 10) /* 100 ms */