From: Andrew Morton Date: Fri, 31 Aug 2007 06:56:17 +0000 (-0700) Subject: process_zones(): fix recovery code X-Git-Tag: v2.6.23-rc5~33 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=641916881322a2dee5b120d509a3bdd05a502510;p=linux-2.6-omap-h63xx.git 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 --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 6427653023a..1a8c59571cb 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));