diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-13 09:24:04 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-20 11:25:11 -0700 |
commit | b522544929b78f2a2a304b1b7c907f28c6f5dcdb (patch) | |
tree | 2cb7467fa3f4d2ddbbab809aca6415a346a871ec /mm | |
parent | 7a9f6ef422319833b02c26aa57b51f837c372f16 (diff) |
mm: fix missing page table unmap for stack guard page failure case
commit 5528f9132cf65d4d892bcbc5684c61e7822b21e9 upstream.
.. which didn't show up in my tests because it's a no-op on x86-64 and
most other architectures. But we enter the function with the last-level
page table mapped, and should unmap it at exit.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c index 4f3ab97b5fc0..7e308fc2f961 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2428,8 +2428,10 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, spinlock_t *ptl; pte_t entry; - if (check_stack_guard_page(vma, address) < 0) + if (check_stack_guard_page(vma, address) < 0) { + pte_unmap(page_table); return VM_FAULT_SIGBUS; + } /* Allocate our own private page. */ pte_unmap(page_table); |