Skip to content

Commit 2fb1d28

Browse files
committed
perf: Fix the POLL_HUP delivery breakage
JIRA: https://issues.redhat.com/browse/RHEL-78198 upstream ======== commit 18dbcbf Author: Kan Liang <kan.liang@linux.intel.com> Date: Mon Aug 11 11:26:44 2025 -0700 description =========== The event_limit can be set by the PERF_EVENT_IOC_REFRESH to limit the number of events. When the event_limit reaches 0, the POLL_HUP signal should be sent. But it's missed. The corresponding counter should be stopped when the event_limit reaches 0. It was implemented in the ARCH-specific code. However, since the commit 9734e25 ("perf: Fix the throttle logic for a group"), all the ARCH-specific code has been moved to the generic code. The code to handle the event_limit was lost. Add the event->pmu->stop(event, 0); back. Fixes: 9734e25 ("perf: Fix the throttle logic for a group") Closes: https://lore.kernel.org/lkml/aICYAqM5EQUlTqtX@li-2b55cdcc-350b-11b2-a85c-a78bff51fc11.ibm.com/ Reported-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Link: https://lkml.kernel.org/r/20250811182644.1305952-1-kan.liang@linux.intel.com Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent c048cbe commit 2fb1d28

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/events/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10336,6 +10336,7 @@ static int __perf_event_overflow(struct perf_event *event,
1033610336
ret = 1;
1033710337
event->pending_kill = POLL_HUP;
1033810338
perf_event_disable_inatomic(event);
10339+
event->pmu->stop(event, 0);
1033910340
}
1034010341

1034110342
if (event->attr.sigtrap) {

0 commit comments

Comments
 (0)