Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758052AbZAMBfY (ORCPT ); Mon, 12 Jan 2009 20:35:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758226AbZAMB3M (ORCPT ); Mon, 12 Jan 2009 20:29:12 -0500 Received: from kroah.org ([198.145.64.141]:36069 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758181AbZAMB3I (ORCPT ); Mon, 12 Jan 2009 20:29:08 -0500 Date: Mon, 12 Jan 2009 17:27:24 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Kyle McMartin Subject: [patch 16/21] parisc: disable UP-optimized flush_tlb_mm Message-ID: <20090113012724.GQ4512@kroah.com> References: <20090113012006.063755472@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="parisc-disable-up-optimized-flush_tlb_mm.patch" In-Reply-To: <20090113012633.GA4512@kroah.com> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1519 Lines: 45 2.6.27-stable review patch. If anyone has any objections, please let us know. ------------------ From: Kyle McMartin commit 5289f46b9de04bde181d833d48df9671b69c4b08 upstream. flush_tlb_mm's "optimized" uniprocessor case of allocating a new context for userspace is exposing a race where we can suddely return to a syscall with the protection id and space id out of sync, trapping on the next userspace access. Debugged-by: James Bottomley Tested-by: Helge Deller Signed-off-by: Kyle McMartin Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- include/asm-parisc/tlbflush.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/include/asm-parisc/tlbflush.h +++ b/include/asm-parisc/tlbflush.h @@ -44,9 +44,12 @@ static inline void flush_tlb_mm(struct m { BUG_ON(mm == &init_mm); /* Should never happen */ -#ifdef CONFIG_SMP +#if 1 || defined(CONFIG_SMP) flush_tlb_all(); #else + /* FIXME: currently broken, causing space id and protection ids + * to go out of sync, resulting in faults on userspace accesses. + */ if (mm) { if (mm->context != 0) free_sid(mm->context); -- 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/