summaryrefslogtreecommitdiffstats
path: root/arch/x86/vdso/vma.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2011-11-29 10:51:07 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-11-29 10:51:07 +0100
commit0d2cd91bf7b1a7cc1d638296111fcc2bcf5c0bb4 (patch)
treed2ca69347816c27f9dc352581f5d0fe76811cd49 /arch/x86/vdso/vma.c
parentInput: elantech - add resolution query support for v4 hardware (diff)
parentLinux 3.2-rc3 (diff)
downloadlinux-0d2cd91bf7b1a7cc1d638296111fcc2bcf5c0bb4.tar.xz
linux-0d2cd91bf7b1a7cc1d638296111fcc2bcf5c0bb4.zip
Merge commit 'v3.2-rc3' into next
Diffstat (limited to 'arch/x86/vdso/vma.c')
-rw-r--r--arch/x86/vdso/vma.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c
index 316fbca3490e..153407c35b75 100644
--- a/arch/x86/vdso/vma.c
+++ b/arch/x86/vdso/vma.c
@@ -89,6 +89,15 @@ static unsigned long vdso_addr(unsigned long start, unsigned len)
addr = start + (offset << PAGE_SHIFT);
if (addr >= end)
addr = end;
+
+ /*
+ * page-align it here so that get_unmapped_area doesn't
+ * align it wrongfully again to the next page. addr can come in 4K
+ * unaligned here as a result of stack start randomization.
+ */
+ addr = PAGE_ALIGN(addr);
+ addr = align_addr(addr, NULL, ALIGN_VDSO);
+
return addr;
}