Skip to content

Commit 2e939d1

Browse files
fbuihuuIngo Molnar
authored andcommitted
perf: Limit event refresh to sampling event
Signed-off-by: Franck Bui-Huu <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 6c7e550 commit 2e939d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/perf_event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ static int perf_event_refresh(struct perf_event *event, int refresh)
10731073
/*
10741074
* not supported on inherited events
10751075
*/
1076-
if (event->attr.inherit)
1076+
if (event->attr.inherit || !is_sampling_event(event))
10771077
return -EINVAL;
10781078

10791079
atomic_add(refresh, &event->event_limit);

0 commit comments

Comments
 (0)