Explorar o código

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>
Franck Bui-Huu %!s(int64=14) %!d(string=hai) anos
pai
achega
2e939d1da9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      kernel/perf_event.c

+ 1 - 1
kernel/perf_event.c

@@ -1073,7 +1073,7 @@ static int perf_event_refresh(struct perf_event *event, int refresh)
 	/*
 	/*
 	 * not supported on inherited events
 	 * not supported on inherited events
 	 */
 	 */
-	if (event->attr.inherit)
+	if (event->attr.inherit || !is_sampling_event(event))
 		return -EINVAL;
 		return -EINVAL;
 
 
 	atomic_add(refresh, &event->event_limit);
 	atomic_add(refresh, &event->event_limit);