Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755344Ab0HMVtG (ORCPT ); Fri, 13 Aug 2010 17:49:06 -0400 Received: from kroah.org ([198.145.64.141]:51680 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754996Ab0HMVtE (ORCPT ); Fri, 13 Aug 2010 17:49:04 -0400 X-Mailbox-Line: From gregkh@clark.site Fri Aug 13 14:46:46 2010 Message-Id: <20100813214646.217005989@clark.site> User-Agent: quilt/0.48-11.2 Date: Fri, 13 Aug 2010 14:42:57 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk Subject: [2/3] mm: fix missing page table unmap for stack guard page failure case In-Reply-To: <20100813214704.GA18960@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1202 Lines: 40 2.6.27-stable review patch. If anyone has any objections, please let us know. ------------------ From: Linus Torvalds 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 Signed-off-by: Greg Kroah-Hartman --- mm/memory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/mm/memory.c +++ b/mm/memory.c @@ -2428,8 +2428,10 @@ static int do_anonymous_page(struct mm_s 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); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/