Commit c9bc175
Peter Zijlstra
perf: Fix __perf_event_overflow() vs perf_remove_from_context() race
Make sure that __perf_event_overflow() runs with IRQs disabled for all
possible callchains. Specifically the software events can end up running
it with only preemption disabled.
This opens up a race vs perf_event_exit_event() and friends that will go
and free various things the overflow path expects to be present, like
the BPF program.
Fixes: 592903c ("perf_counter: add an event_list")
Reported-by: Simond Hu <cmdhh1767@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Simond Hu <cmdhh1767@gmail.com>
Link: https://patch.msgid.link/20260224122909.GV1395416@noisy.programming.kicks-ass.net1 parent 77de62a commit c9bc175
1 file changed
+41
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10777 | 10777 | | |
10778 | 10778 | | |
10779 | 10779 | | |
| 10780 | + | |
| 10781 | + | |
| 10782 | + | |
| 10783 | + | |
| 10784 | + | |
| 10785 | + | |
| 10786 | + | |
10780 | 10787 | | |
10781 | 10788 | | |
10782 | 10789 | | |
| |||
10853 | 10860 | | |
10854 | 10861 | | |
10855 | 10862 | | |
| 10863 | + | |
| 10864 | + | |
| 10865 | + | |
| 10866 | + | |
| 10867 | + | |
| 10868 | + | |
| 10869 | + | |
| 10870 | + | |
| 10871 | + | |
| 10872 | + | |
| 10873 | + | |
| 10874 | + | |
| 10875 | + | |
10856 | 10876 | | |
10857 | 10877 | | |
10858 | 10878 | | |
| |||
10861 | 10881 | | |
10862 | 10882 | | |
10863 | 10883 | | |
| 10884 | + | |
| 10885 | + | |
| 10886 | + | |
| 10887 | + | |
| 10888 | + | |
| 10889 | + | |
| 10890 | + | |
| 10891 | + | |
| 10892 | + | |
| 10893 | + | |
10864 | 10894 | | |
10865 | 10895 | | |
10866 | 10896 | | |
| |||
11359 | 11389 | | |
11360 | 11390 | | |
11361 | 11391 | | |
| 11392 | + | |
| 11393 | + | |
| 11394 | + | |
| 11395 | + | |
| 11396 | + | |
11362 | 11397 | | |
11363 | 11398 | | |
11364 | 11399 | | |
| |||
11691 | 11726 | | |
11692 | 11727 | | |
11693 | 11728 | | |
| 11729 | + | |
| 11730 | + | |
| 11731 | + | |
| 11732 | + | |
| 11733 | + | |
11694 | 11734 | | |
11695 | 11735 | | |
11696 | 11736 | | |
| |||
12155 | 12195 | | |
12156 | 12196 | | |
12157 | 12197 | | |
12158 | | - | |
| 12198 | + | |
12159 | 12199 | | |
12160 | 12200 | | |
12161 | 12201 | | |
| |||
0 commit comments