aboutsummaryrefslogtreecommitdiff
path: root/kernel/perf_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/perf_event.c')
-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.