aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/events/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/events/core.c')
-rw-r--r--kernel/events/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index c80549bf82c6..dcb093e7b377 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -3935,6 +3935,12 @@ int perf_event_read_local(struct perf_event *event, u64 *value,
3935 goto out; 3935 goto out;
3936 } 3936 }
3937 3937
3938 /* If this is a pinned event it must be running on this CPU */
3939 if (event->attr.pinned && event->oncpu != smp_processor_id()) {
3940 ret = -EBUSY;
3941 goto out;
3942 }
3943
3938 /* 3944 /*
3939 * If the event is currently on this CPU, its either a per-task event, 3945 * If the event is currently on this CPU, its either a per-task event,
3940 * or local to this CPU. Furthermore it means its ACTIVE (otherwise 3946 * or local to this CPU. Furthermore it means its ACTIVE (otherwise