[patch 33/42] sparc64: Fix overshoot in nid_range().
From: Greg KH
Date: Wed Sep 03 2008 - 13:44:37 EST
2.6.26-stable review patch. If anyone has any objections, please let us know.
------------------
From: David S. Miller <davem@xxxxxxxxxxxxx>
[ Upstream commit c918dcce92f76bb9903e4d049f4780bad384c207 ]
If 'start' does not begin on a page boundary, we can overshoot
past 'end'.
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
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
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/