+2
−1
Loading
Due to an oversight in merging: da916e96 ("perf: Make perf_pmu_unregister() useable") on top of: 56799bc0 ("perf: Fix hang while freeing sigtrap event") .. it is now possible to hit put_event(EVENT_TOMBSTONE), which makes the computer sad. This also means that for the event->parent == EVENT_TOMBSTONE, the put_event() matching inherit_event() has gone missing. Previously this was done in perf_event_release_kernel() after calling perf_remove_from_context(), but with it delegated to put_event(), this case is now entirely missed, leading to leaks. Fixes: da916e96 ("perf: Make perf_pmu_unregister() useable") Reported-by:kernel test robot <oliver.sang@intel.com> Tested-by:
kernel test robot <oliver.sang@intel.com> Tested-by:
James Clark <james.clark@linaro.org> Tested-by:
Venkat Rao Bagalkote <venkat88@linux.ibm.com> Signed-off-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by:
Ingo Molnar <mingo@kernel.org> Closes: https://lore.kernel.org/oe-lkp/202504131701.941039cd-lkp@intel.com Link: https://lkml.kernel.org/r/20250415131446.GN5600@noisy.programming.kicks-ass.net