]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
perf: Update the mmap control page on mmap()
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 21 Nov 2011 14:13:29 +0000 (15:13 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 21 Dec 2011 10:01:05 +0000 (11:01 +0100)
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 <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Arun Sharma <asharma@fb.com>
Link: http://lkml.kernel.org/n/tip-dcpi7164djsexmx6ya7lilrc@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/events/core.c

index 2f8f3f103cb444e333b31c600bf09425a1af3e60..0ca1f648ac08cf6508234b19a2bcbe0c7a97e390 100644 (file)
@@ -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);