提交 9a0f05cb 编写于 作者: P Peter Zijlstra 提交者: Ingo Molnar

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: NPeter 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.orgSigned-off-by: NIngo Molnar <mingo@elte.hu>
上级 f1ac18af
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册