From: Andrew Morton Date: Fri, 31 Aug 2007 06:56:17 +0000 (-0700) Subject: process_zones(): fix recovery code X-Git-Tag: firefly_0821_release~26628 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=641916881322a2dee5b120d509a3bdd05a502510;p=firefly-linux-kernel-4.4.55.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 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));