diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-08-31 02:56:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-31 04:42:22 -0400 |
commit | 641916881322a2dee5b120d509a3bdd05a502510 (patch) | |
tree | 79c0b1f449bcf09404ba932b07330a24bce4d00d /mm/page_alloc.c | |
parent | 060d11b0b35d13eb2251fd08403d900b71df5791 (diff) |
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.c | 2 |
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) | |||
2345 | return 0; | 2345 | return 0; |
2346 | bad: | 2346 | bad: |
2347 | for_each_zone(dzone) { | 2347 | for_each_zone(dzone) { |
2348 | if (!populated_zone(dzone)) | ||
2349 | continue; | ||
2348 | if (dzone == zone) | 2350 | if (dzone == zone) |
2349 | break; | 2351 | break; |
2350 | kfree(zone_pcp(dzone, cpu)); | 2352 | kfree(zone_pcp(dzone, cpu)); |