Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757755AbYLKTUT (ORCPT ); Thu, 11 Dec 2008 14:20:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756916AbYLKTSJ (ORCPT ); Thu, 11 Dec 2008 14:18:09 -0500 Received: from kroah.org ([198.145.64.141]:55856 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756525AbYLKTSE (ORCPT ); Thu, 11 Dec 2008 14:18:04 -0500 Date: Thu, 11 Dec 2008 11:13:44 -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, "David S. Miller" Subject: [patch 07/83] sparc64: Fix offset calculation in compute_size() Message-ID: <20081211191344.GG5894@kroah.com> References: <20081211190201.612240183@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="0001-sparc64-Fix-offset-calculation-in-compute_size.patch" In-Reply-To: <20081211191014.GA5759@suse.de> 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: 1040 Lines: 35 2.6.27-stable review patch. If anyone has any objections, please let us know. ------------------ From: David S. Miller [ Upstream commit b270ee8a9fc9547eb781ce9ccd379450bcf9a204 ] The fault address is somewhere inside of the buffer, not before it. Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- arch/sparc64/lib/user_fixup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/sparc64/lib/user_fixup.c +++ b/arch/sparc64/lib/user_fixup.c @@ -24,7 +24,7 @@ static unsigned long compute_size(unsign if (fault_addr < start || fault_addr >= end) { *offset = 0; } else { - *offset = start - fault_addr; + *offset = fault_addr - start; size = end - fault_addr; } return size; -- 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/