summaryrefslogtreecommitdiffstats
path: root/kernel/perf_event.c
diff options
context:
space:
mode:
authorFranck Bui-Huu <fbuihuu@gmail.com>2010-11-23 16:21:44 +0100
committerIngo Molnar <mingo@elte.hu>2010-11-26 15:14:55 +0100
commit2e939d1da9b5628642314c1e68b4319e61263c94 (patch)
tree6f950949dcacdb1332b8001351fb317777df4930 /kernel/perf_event.c
parent6c7e550f13f8ad82efb6a5653ae628c2543c1768 (diff)
perf: Limit event refresh to sampling event
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>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r--kernel/perf_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 880698488c9..027c4d33b4d 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -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);