From: Franck Bui-Huu Date: Tue, 23 Nov 2010 15:21:44 +0000 (+0100) Subject: perf: Limit event refresh to sampling event X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2e939d1da9b5628642314c1e68b4319e61263c94;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git perf: Limit event refresh to sampling event Signed-off-by: Franck Bui-Huu Signed-off-by: Peter Zijlstra LKML-Reference: <1290525705-6265-2-git-send-email-fbuihuu@gmail.com> Signed-off-by: Ingo Molnar --- 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) /* * 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);