Skip to content

Commit 18dbcbf

Browse files
Kan LiangPeter Zijlstra
authored andcommitted
perf: Fix the POLL_HUP delivery breakage
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/[email protected]/ Reported-by: Sumanth Korikkar <[email protected]> Signed-off-by: Kan Liang <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Tested-by: Sumanth Korikkar <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent b320789 commit 18dbcbf

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
@@ -10330,6 +10330,7 @@ static int __perf_event_overflow(struct perf_event *event,
1033010330
ret = 1;
1033110331
event->pending_kill = POLL_HUP;
1033210332
perf_event_disable_inatomic(event);
10333+
event->pmu->stop(event, 0);
1033310334
}
1033410335

1033510336
if (event->attr.sigtrap) {

0 commit comments

Comments
 (0)