Message ID | 158755785264.28353.15436360627491965116.tip-bot2@tip-bot2 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [tip:,perf/core] drivers/oprofile: Open access for CAP_PERFMON privileged process | expand |
diff --git a/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c index 12ea4a4..6c9edc8 100644 --- a/drivers/oprofile/event_buffer.c +++ b/drivers/oprofile/event_buffer.c @@ -113,7 +113,7 @@ static int event_buffer_open(struct inode *inode, struct file *file) { int err = -EPERM; - if (!capable(CAP_SYS_ADMIN)) + if (!perfmon_capable()) return -EPERM; if (test_and_set_bit_lock(0, &buffer_opened))