mm: fix overflow in find_zone_movable_pfns_for_nodes()
Subsystems (2)
PATCH 1/1 mm: fix overflow in find_zone_movable_pfns_for_nodes()
If user set "movablecore=xx" to a large number, corepages will overflow, this patch fix the problem.
--- mm/page_alloc.c | 1 + 1 file changed, 1 insertion(+)
mm/page_alloc.c +1 -0
@@ -5668,6 +5668,7 @@ static void __init find_zone_movable_pfns_for_nodes(void)*/ required_movablecore =roundup (required_movablecore,MAX_ORDER_NR_PAGES ); + required_movablecore =min (totalpages, required_movablecore); corepages = totalpages - required_movablecore; required_kernelcore =max (required_kernelcore, corepages);
Signature · 1 line
2.0.0
Seems OK to me.
Thanks.
Quoted 20 lines · Xishi Qiu
If user set "movablecore=xx" to a large number, corepages will overflow, this patch fix the problem.
Signed-off-by Xishi Qiu <[email protected]>--- mm/page_alloc.c | 1 + 1 file changed, 1 insertion(+)mm/page_alloc.c +1
-0@@ -5668,6 +5668,7 @@ static void __init find_zone_movable_pfns_for_nodes(void)*/ required_movablecore =roundup (required_movablecore,MAX_ORDER_NR_PAGES ); + required_movablecore =min (totalpages, required_movablecore); corepages = totalpages - required_movablecore; required_kernelcore =max (required_kernelcore, corepages);
Quoted 4 lines · Xishi Qiu
If user set "movablecore=xx" to a large number, corepages will overflow, this patch fix the problem.
Signed-off-by Xishi Qiu <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 5 lines · On Wed, 30 Sep 2015 17:33:42 +0800 Xishi Qiu <[email protected]> wrote:
If user set "movablecore=xx" to a large number, corepages will overflow, this patch fix the problem.
Signed-off-by Xishi Qiu <[email protected]>---
Looks good to me.
Thanks,
Yasuaki Ishimatsu
Quoted 24 lines
mm/page_alloc.c | 1 + 1 file changed, 1 insertion(+)mm/page_alloc.c +1
-0@@ -5668,6 +5668,7 @@ static void __init find_zone_movable_pfns_for_nodes(void)*/ required_movablecore =roundup (required_movablecore,MAX_ORDER_NR_PAGES ); + required_movablecore =min (totalpages, required_movablecore); corepages = totalpages - required_movablecore; required_kernelcore =max (required_kernelcore, corepages);Signature · 8 lines
2.0.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>