Index: linux-2.6.17/mm/page_alloc.c =================================================================== --- linux-2.6.17.orig/mm/page_alloc.c 2006-07-09 08:46:47.000000000 -0700 +++ linux-2.6.17/mm/page_alloc.c 2006-07-09 08:51:00.000000000 -0700 @@ -687,6 +687,8 @@ struct per_cpu_pageset *pset; pset = zone_pcp(zone, cpu); + if (!pset) + continue; for (i = 0; i < ARRAY_SIZE(pset->pcp); i++) { struct per_cpu_pages *pcp; @@ -1931,6 +1933,11 @@ for_each_zone(zone) { + if (!populated_zone(zone)) { + zone_pcp(zone, cpu) = NULL + continue; + } + zone_pcp(zone, cpu) = kmalloc_node(sizeof(struct per_cpu_pageset), GFP_KERNEL, cpu_to_node(cpu)); if (!zone_pcp(zone, cpu)) @@ -1948,6 +1955,8 @@ for_each_zone(dzone) { if (dzone == zone) break; + if (!populated_zone(zone)) + continue; kfree(zone_pcp(dzone, cpu)); zone_pcp(dzone, cpu) = NULL; }