diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-11-21 09:13:29 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-12-21 05:01:05 -0500 |
commit | 9a0f05cb36888550d1509d60aa55788615abea44 (patch) | |
tree | db001d4345d12cad98b7df4f29ca98e572087a7a /kernel/events/core.c | |
parent | f1ac18af219835fd5b8e19c14d2dd75c55f78737 (diff) |
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 <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>
Diffstat (limited to 'kernel/events/core.c')
-rw-r--r-- | kernel/events/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 2f8f3f103cb4..0ca1f648ac08 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) | |||
3534 | event->mmap_user = get_current_user(); | 3534 | event->mmap_user = get_current_user(); |
3535 | vma->vm_mm->pinned_vm += event->mmap_locked; | 3535 | vma->vm_mm->pinned_vm += event->mmap_locked; |
3536 | 3536 | ||
3537 | perf_event_update_userpage(event); | ||
3538 | |||
3537 | unlock: | 3539 | unlock: |
3538 | if (!ret) | 3540 | if (!ret) |
3539 | atomic_inc(&event->mmap_count); | 3541 | atomic_inc(&event->mmap_count); |