diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/perf_counter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c index e0d91fdf0c3c..667ab25ad3d5 100644 --- a/kernel/perf_counter.c +++ b/kernel/perf_counter.c | |||
@@ -2315,7 +2315,8 @@ static int perf_mmap(struct file *file, struct vm_area_struct *vma) | |||
2315 | lock_limit >>= PAGE_SHIFT; | 2315 | lock_limit >>= PAGE_SHIFT; |
2316 | locked = vma->vm_mm->locked_vm + extra; | 2316 | locked = vma->vm_mm->locked_vm + extra; |
2317 | 2317 | ||
2318 | if ((locked > lock_limit) && !capable(CAP_IPC_LOCK)) { | 2318 | if ((locked > lock_limit) && perf_paranoid_tracepoint_raw() && |
2319 | !capable(CAP_IPC_LOCK)) { | ||
2319 | ret = -EPERM; | 2320 | ret = -EPERM; |
2320 | goto unlock; | 2321 | goto unlock; |
2321 | } | 2322 | } |