From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752778AbYICRog (ORCPT ); Wed, 3 Sep 2008 13:44:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755677AbYICRoU (ORCPT ); Wed, 3 Sep 2008 13:44:20 -0400 Received: from cantor.suse.de ([195.135.220.2]:52908 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756880AbYICRoT (ORCPT ); Wed, 3 Sep 2008 13:44:19 -0400 Date: Wed, 3 Sep 2008 10:26:33 -0700 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 33/42] sparc64: Fix overshoot in nid_range(). Message-ID: <20080903172633.GH7731@suse.de> References: <20080903171927.534216229@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="0001-sparc64-Fix-overshoot-in-nid_range.patch" In-Reply-To: <20080903172447.GA7731@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 2.6.26-stable review patch. If anyone has any objections, please let us know. ------------------ From: David S. Miller [ Upstream commit c918dcce92f76bb9903e4d049f4780bad384c207 ] If 'start' does not begin on a page boundary, we can overshoot past 'end'. Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- arch/sparc64/mm/init.c | 3 +++ 1 file changed, 3 insertions(+) --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -842,6 +842,9 @@ static unsigned long nid_range(unsigned start += PAGE_SIZE; } + if (start > end) + start = end; + return start; } #else --