public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [trival patch]x86: unmap vdso pages are missed
@ 2010-07-30  7:55 Shaohua Li
  2010-07-30 17:02 ` H. Peter Anvin
  0 siblings, 1 reply; 4+ messages in thread
From: Shaohua Li @ 2010-07-30  7:55 UTC (permalink / raw)
  To: lkml; +Cc: Ingo Molnar, H. Peter Anvin

The memory hasn't been unmapped.

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:



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [trival patch]x86: unmap vdso pages are missed
  2010-07-30  7:55 [trival patch]x86: unmap vdso pages are missed Shaohua Li
@ 2010-07-30 17:02 ` H. Peter Anvin
  2010-08-02  0:49   ` Shaohua Li
  0 siblings, 1 reply; 4+ messages in thread
From: H. Peter Anvin @ 2010-07-30 17:02 UTC (permalink / raw)
  To: Shaohua Li; +Cc: lkml, Ingo Molnar

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.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [trival patch]x86: unmap vdso pages are missed
  2010-07-30 17:02 ` H. Peter Anvin
@ 2010-08-02  0:49   ` Shaohua Li
  2010-08-02 23:42     ` [tip:x86/vdso] x86, vdso: Unmap vdso pages tip-bot for Shaohua Li
  0 siblings, 1 reply; 4+ messages in thread
From: Shaohua Li @ 2010-08-02  0:49 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: lkml, Ingo Molnar

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:

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [tip:x86/vdso] x86, vdso: Unmap vdso pages
  2010-08-02  0:49   ` Shaohua Li
@ 2010-08-02 23:42     ` tip-bot for Shaohua Li
  0 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Shaohua Li @ 2010-08-02 23:42 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, shaohua.li, tglx, hpa

Commit-ID:  be783a47214afc5a0aea9dafcbd9f1535ba05e94
Gitweb:     http://git.kernel.org/tip/be783a47214afc5a0aea9dafcbd9f1535ba05e94
Author:     Shaohua Li <shaohua.li@intel.com>
AuthorDate: Mon, 2 Aug 2010 08:49:34 +0800
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Mon, 2 Aug 2010 15:11:59 -0700

x86, vdso: Unmap vdso pages

We mapped vdso pages but never unmapped them and the virtual address
is lost after exiting from the function, so unmap vdso pages here.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
LKML-Reference: <20100802004934.GA2505@sli10-desk.sh.intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/vdso/vma.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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:

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-02 23:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-30  7:55 [trival patch]x86: unmap vdso pages are missed Shaohua Li
2010-07-30 17:02 ` H. Peter Anvin
2010-08-02  0:49   ` Shaohua Li
2010-08-02 23:42     ` [tip:x86/vdso] x86, vdso: Unmap vdso pages tip-bot for Shaohua Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox