Skip to content

Commit

Permalink
perf: Limit event refresh to sampling event
Browse files Browse the repository at this point in the history
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1290525705-6265-2-git-send-email-fbuihuu@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Franck Bui-Huu authored and Ingo Molnar committed Nov 26, 2010
1 parent 6c7e550 commit 2e939d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ static int perf_event_refresh(struct perf_event *event, int refresh)
/*
* not supported on inherited events
*/
if (event->attr.inherit)
if (event->attr.inherit || !is_sampling_event(event))
return -EINVAL;

atomic_add(refresh, &event->event_limit);
Expand Down

0 comments on commit 2e939d1

Please sign in to comment.