diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-10-22 02:15:32 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-10-22 02:15:32 +0300 |
commit | aa7a7b72974a4612a85bb395a4b23b973ffc7d2b (patch) | |
tree | 35c61f29a9a2876f609a2f7827f1094c4c392dc3 /kernel/events | |
parent | ae79d5588a04aec9dc4b0c6df700d131447306e0 (diff) | |
parent | 5e6c3c7b1ec217c1c4c95d9148182302b9969b97 (diff) | |
download | linux-aa7a7b72974a4612a85bb395a4b23b973ffc7d2b.tar.xz |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/events')
-rw-r--r-- | kernel/events/core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index f9a5d4356562..5bbaabdad068 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -5619,8 +5619,10 @@ static void perf_mmap_close(struct vm_area_struct *vma) perf_pmu_output_stop(event); /* now it's safe to free the pages */ - atomic_long_sub(rb->aux_nr_pages, &mmap_user->locked_vm); - atomic64_sub(rb->aux_mmap_locked, &vma->vm_mm->pinned_vm); + if (!rb->aux_mmap_locked) + atomic_long_sub(rb->aux_nr_pages, &mmap_user->locked_vm); + else + atomic64_sub(rb->aux_mmap_locked, &vma->vm_mm->pinned_vm); /* this has to be the last one */ rb_free_aux(rb); |