Commit a551844
Peter Zijlstra
perf: Fix use-after-free in error path
The syscall error path has a use-after-free; put_pmu_ctx() will
reference ctx, therefore we must ensure ctx is destroyed after pmu_ctx
is.
Fixes: bd27568 ("perf: Rewrite core context handling")
Reported-by: syzbot+b8e8c01c8ade4fe6e48f@syzkaller.appspotmail.com
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Chengming Zhou <zhouchengming@bytedance.com>
Link: https://lkml.kernel.org/r/Y6B3xEgkbmFUCeni@hirez.programming.kicks-ass.net1 parent 0824567 commit a551844
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12671 | 12671 | | |
12672 | 12672 | | |
12673 | 12673 | | |
12674 | | - | |
| 12674 | + | |
| 12675 | + | |
12675 | 12676 | | |
12676 | 12677 | | |
12677 | 12678 | | |
| |||
12784 | 12785 | | |
12785 | 12786 | | |
12786 | 12787 | | |
| 12788 | + | |
12787 | 12789 | | |
12788 | 12790 | | |
12789 | 12791 | | |
| |||
0 commit comments