mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
mm: fix missing page table unmap for stack guard page failure case
commit 5528f9132c 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7e281afe24
commit
ab83242267
@@ -2662,8 +2662,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;
|
||||
}
|
||||
|
||||
if (!(flags & FAULT_FLAG_WRITE)) {
|
||||
entry = pte_mkspecial(pfn_pte(my_zero_pfn(address),
|
||||
|
||||
Reference in New Issue
Block a user