Commit 645a387ecbdb4aa78c8451a66416340616134537
Committed by
H. Peter Anvin
1 parent
3c1b63b9e4
Exists in
master
and in
13 other branches
x86, vdso: Fix size of get_unmapped_area()
The size of the reserved memory for a 32 bit vdso must be the size of the 32 bit vDSO in pages + HPET page + VVAR page. One page is not enough for this. Grrrr.... silly copy and paste bug, was right in previous patch. Signed-off-by: Stefani Seibold <stefani@seibold.net> Cc: Andy Lutomirski <luto@amacapital.net> Link: http://lkml.kernel.org/r/1395592694-20571-1-git-send-email-stefani@seibold.net Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
arch/x86/vdso/vdso32-setup.c
... | ... | @@ -165,11 +165,13 @@ |
165 | 165 | |
166 | 166 | down_write(&mm->mmap_sem); |
167 | 167 | |
168 | - addr = get_unmapped_area(NULL, 0, PAGE_SIZE, 0, 0); | |
168 | + addr = get_unmapped_area(NULL, 0, vdso32_size + VDSO_OFFSET(VDSO_PREV_PAGES), 0, 0); | |
169 | 169 | if (IS_ERR_VALUE(addr)) { |
170 | 170 | ret = addr; |
171 | 171 | goto up_fail; |
172 | 172 | } |
173 | + | |
174 | + addr += VDSO_OFFSET(VDSO_PREV_PAGES); | |
173 | 175 | |
174 | 176 | current->mm->context.vdso = (void *)addr; |
175 | 177 |