mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
perf: Update the mmap control page on mmap()
Apparently we didn't update the mmap control page right after mmap(), which leads to surprises when userspace wants to use it. Signed-off-by: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Arun Sharma <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
f1ac18af21
commit
9a0f05cb36
1 changed files with 2 additions and 0 deletions
|
|
@ -3534,6 +3534,8 @@ static int perf_mmap(struct file *file, struct vm_area_struct *vma)
|
|||
event->mmap_user = get_current_user();
|
||||
vma->vm_mm->pinned_vm += event->mmap_locked;
|
||||
|
||||
perf_event_update_userpage(event);
|
||||
|
||||
unlock:
|
||||
if (!ret)
|
||||
atomic_inc(&event->mmap_count);
|
||||
|
|
|
|||
Loading…
Reference in a new issue