summaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-08-31 08:56:17 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-31 10:42:22 +0200
commit641916881322a2dee5b120d509a3bdd05a502510 (patch)
tree79c0b1f449bcf09404ba932b07330a24bce4d00d /mm/page_alloc.c
parentrevert "eCryptfs: fix lookup error for special files" (diff)
downloadlinux-641916881322a2dee5b120d509a3bdd05a502510.tar.xz
linux-641916881322a2dee5b120d509a3bdd05a502510.zip
process_zones(): fix recovery code
Don't try to free memory which we didn't allocate. Acked-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c2
1 files changed, 2 insertions, 0 deletions
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));