perf: Update the mmap control page on mmap()
Commit-ID: 9a0f05cb36888550d1509d60aa55788615abea44 Gitweb: http://git.kernel.org/tip/9a0f05cb36888550d1509d60aa55788615abea44 Author: Peter Zijlstra <[email protected]> AuthorDate: Mon, 21 Nov 2011 15:13:29 +0100 Committer: Ingo Molnar <[email protected]> CommitDate: Wed, 21 Dec 2011 11:01:05 +0100
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]>
Signed-off-by Ingo Molnar <[email protected]>
--- kernel/events/core.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
kernel/events/core.c +2 -0
@@ -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);