]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf/core: Fix perf-stat / read()
authorPeter Zijlstra <peterz@infradead.org>
Wed, 16 Apr 2025 18:50:27 +0000 (20:50 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 17 Apr 2025 12:21:15 +0000 (14:21 +0200)
commitf6938a562a6249000de211a710807ebf0b8fdf26
treed8631aaec350243a7ad4dc674a8a1550bc8fa52f
parent1d34a0543378aac1b09f7707970c1c75a62bb5a4
perf/core: Fix perf-stat / read()

In the zeal to adjust all event->state checks to include the new
REVOKED state, one adjustment was made in error. Notably it resulted
in read() on the perf filedesc to stop working for any state lower
than ERROR, specifically EXIT.

This leads to problems with (among others) perf-stat, which wants to
read the counts after a program has finished execution.

Fixes: da916e96e2de ("perf: Make perf_pmu_unregister() useable")
Reported-by: "Mi, Dapeng" <dapeng1.mi@linux.intel.com>
Reported-by: James Clark <james.clark@linaro.org>
Tested-by: James Clark <james.clark@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/77036114-8723-4af9-a068-1d535f4e2e81@linaro.org
Link: https://lore.kernel.org/r/20250417080725.GH38216@noisy.programming.kicks-ass.net
kernel/events/core.c