From: Peter Zijlstra Date: Mon, 21 Nov 2011 14:13:29 +0000 (+0100) Subject: perf: Update the mmap control page on mmap() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9a0f05cb36888550d1509d60aa55788615abea44;p=mv-sheeva.git 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 Cc: Stephane Eranian Cc: Arun Sharma Link: http://lkml.kernel.org/n/tip-dcpi7164djsexmx6ya7lilrc@git.kernel.org Signed-off-by: Ingo Molnar --- diff --git a/kernel/events/core.c b/kernel/events/core.c index 2f8f3f103cb..0ca1f648ac0 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -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);