aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2011-03-07 21:27:09 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-23 13:16:52 -0700
commit6f197b73304b3bd3d5a43b931383a5331d6b2987 (patch)
treed23db2773bb63b9960a6ea111aadeaeb7e67122b /kernel
parent7762386ff2f35364d13703579503e4b9f130cd75 (diff)
perf: Handle stopped state with tracepoints
commit a0f7d0f7fc02465bb9758501f611f63381792996 upstream. We toggle the state from start and stop callbacks but actually don't check it when the event triggers. Do it so that these callbacks actually work. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Stephane Eranian <eranian@google.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1299529629-18280-2-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/perf_event.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 183d437f4a0..f9af60f30ad 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -4167,6 +4167,8 @@ static void tp_perf_event_destroy(struct perf_event *event)
static const struct pmu *tp_perf_event_init(struct perf_event *event)
{
+ if (event->hw.state & PERF_HES_STOPPED)
+ return 0;
/*
* Raw tracepoint data is a severe data leak, only allow root to
* have these.