aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorFranck Bui-Huu <fbuihuu@gmail.com>2010-11-23 10:21:44 -0500
committerIngo Molnar <mingo@elte.hu>2010-11-26 09:14:55 -0500
commit2e939d1da9b5628642314c1e68b4319e61263c94 (patch)
tree6f950949dcacdb1332b8001351fb317777df4930 /kernel
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')
-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 880698488c91..027c4d33b4d3 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)
1073 /* 1073 /*
1074 * not supported on inherited events 1074 * not supported on inherited events
1075 */ 1075 */
1076 if (event->attr.inherit) 1076 if (event->attr.inherit || !is_sampling_event(event))
1077 return -EINVAL; 1077 return -EINVAL;
1078 1078
1079 atomic_add(refresh, &event->event_limit); 1079 atomic_add(refresh, &event->event_limit);