aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-03 01:20:37 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-09-08 04:44:29 -0700
commit5d77cfb999845251dd6271b0e3ccf89eba26b3e2 (patch)
treee3874fc9bf0d02cbb8819bfa11ac037f4c5b242b /arch
parent464f8f4932d128a3e80402ec85d7c40c1f5e6899 (diff)
sparc64: Fix overshoot in nid_range().
[ Upstream commit c918dcce92f76bb9903e4d049f4780bad384c207 ] If 'start' does not begin on a page boundary, we can overshoot past 'end'. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/mm/init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index e289a985af8..c2094e19143 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -842,6 +842,9 @@ static unsigned long nid_range(unsigned long start, unsigned long end,
start += PAGE_SIZE;
}
+ if (start > end)
+ start = end;
+
return start;
}
#else