mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shaohua Li <shaohua.li@intel.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: lkml <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@redhat.com>
Subject: Re: [trival patch]x86: unmap vdso pages are missed
Date: Mon, 2 Aug 2010 08:49:34 +0800	[thread overview]
Message-ID: <20100802004934.GA2505@sli10-desk.sh.intel.com> (raw)
In-Reply-To: <4C53058A.2050408@zytor.com>

On Sat, Jul 31, 2010 at 01:02:02AM +0800, H. Peter Anvin wrote:
> On 07/30/2010 12:55 AM, Shaohua Li wrote:
> > The memory hasn't been unmapped.
> > 
> > Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> 
> Looks right, but it would be really good if you could provide a more
> verbose description about why this is the right thing to do.
 
We mapped vdso pages but never unmapped them and the vitrual address is lost after
exitting from the function. So unmap vdso pages here.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>

diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c
index ac74869..80f23ed 100644
--- a/arch/x86/vdso/vma.c
+++ b/arch/x86/vdso/vma.c
@@ -67,6 +67,7 @@ static int __init init_vdso_vars(void)
 	*(typeof(__ ## x) **) var_ref(VDSO64_SYMBOL(vbase, x), #x) = &__ ## x;
 #include "vextern.h"
 #undef VEXTERN
+	vunmap(vbase);
 	return 0;
 
  oom:

  reply	other threads:[~2010-08-02  0:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-30  7:55 Shaohua Li
2010-07-30 17:02 ` H. Peter Anvin
2010-08-02  0:49   ` Shaohua Li [this message]
2010-08-02 23:42     ` [tip:x86/vdso] x86, vdso: Unmap vdso pages tip-bot for Shaohua Li

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=20100802004934.GA2505@sli10-desk.sh.intel.com \
    --to=shaohua.li@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    /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

all inboxes | Powered by JetHome®