Message ID | 20200413165203.1816-8-acme@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
diff --git a/kernel/events/core.c b/kernel/events/core.c index f9d564127e2e..d6e021612b2c 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -9377,7 +9377,7 @@ static int perf_kprobe_event_init(struct perf_event *event) if (event->attr.type != perf_kprobe.type) return -ENOENT; - if (!capable(CAP_SYS_ADMIN)) + if (!perfmon_capable()) return -EACCES; /* @@ -9437,7 +9437,7 @@ static int perf_uprobe_event_init(struct perf_event *event) if (event->attr.type != perf_uprobe.type) return -ENOENT; - if (!capable(CAP_SYS_ADMIN)) + if (!perfmon_capable()) return -EACCES; /*