Apparently we didn't update the mmap control page right after mmap(), which leads to surprises when userspace wants to use it. Cc: Stephane Eranian Cc: Arun Sharma Signed-off-by: Peter Zijlstra --- kernel/events/core.c | 2 ++ 1 file changed, 2 insertions(+) Index: linux-2.6/kernel/events/core.c =================================================================== --- linux-2.6.orig/kernel/events/core.c +++ linux-2.6/kernel/events/core.c @@ -3463,6 +3463,8 @@ static int perf_mmap(struct file *file, 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); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/