From 641916881322a2dee5b120d509a3bdd05a502510 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 30 Aug 2007 23:56:17 -0700 Subject: [PATCH] process_zones(): fix recovery code Don't try to free memory which we didn't allocate. Acked-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/page_alloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 6427653023aa..1a8c59571cb7 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2345,6 +2345,8 @@ static int __cpuinit process_zones(int cpu) return 0; bad: for_each_zone(dzone) { + if (!populated_zone(dzone)) + continue; if (dzone == zone) break; kfree(zone_pcp(dzone, cpu)); -- 2.30.2