From: tip-bot for Peter Zijlstra <a.p.zijlstra@chello.nl>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, eranian@google.com, hpa@zytor.com,
mingo@redhat.com, a.p.zijlstra@chello.nl, tglx@linutronix.de,
asharma@fb.com, mingo@elte.hu
Subject: [tip:perf/fast] perf: Update the mmap control page on mmap()
Date: Wed, 21 Dec 2011 03:46:33 -0800 [thread overview]
Message-ID: <tip-dcpi7164djsexmx6ya7lilrc@git.kernel.org> (raw)
Commit-ID: 9a0f05cb36888550d1509d60aa55788615abea44
Gitweb: http://git.kernel.org/tip/9a0f05cb36888550d1509d60aa55788615abea44
Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
AuthorDate: Mon, 21 Nov 2011 15:13:29 +0100
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 21 Dec 2011 11:01:05 +0100
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>
---
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 2f8f3f1..0ca1f64 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);
reply other threads:[~2011-12-21 11:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-dcpi7164djsexmx6ya7lilrc@git.kernel.org \
--to=a.p.zijlstra@chello.nl \
--cc=asharma@fb.com \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome