Skip to content

Commit a603abe

Browse files
committed
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
2 parents f31acae + b583ef8 commit a603abe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/events/uprobes.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,7 @@ void uprobe_free_utask(struct task_struct *t)
19151915
if (!utask)
19161916
return;
19171917

1918+
t->utask = NULL;
19181919
WARN_ON_ONCE(utask->active_uprobe || utask->xol_vaddr);
19191920

19201921
timer_delete_sync(&utask->ri_timer);
@@ -1924,7 +1925,6 @@ void uprobe_free_utask(struct task_struct *t)
19241925
ri = free_ret_instance(ri, true /* cleanup_hprobe */);
19251926

19261927
kfree(utask);
1927-
t->utask = NULL;
19281928
}
19291929

19301930
#define RI_TIMER_PERIOD (HZ / 10) /* 100 ms */

0 commit comments

Comments
 (0)