Re: [BUG] i386 2.6.18 cpu_up: attempt to bring up CPU 4 failed :kernel BUG at mm/slab.c:2698!

From: Andrew Morton
Date: Thu Sep 21 2006 - 23:46:50 EST


On Fri, 22 Sep 2006 12:30:45 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> Before kfree(), we should check zone_pcp() is not boot_pageset[].
>
> Signed-Off-By KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
>
> Index: linux-2.6.18/mm/page_alloc.c
> ===================================================================
> --- linux-2.6.18.orig/mm/page_alloc.c 2006-09-20 12:42:06.000000000 +0900
> +++ linux-2.6.18/mm/page_alloc.c 2006-09-22 12:22:03.000000000 +0900
> @@ -1844,9 +1844,11 @@
>
> for_each_zone(zone) {
> struct per_cpu_pageset *pset = zone_pcp(zone, cpu);
> -
> - zone_pcp(zone, cpu) = NULL;
> - kfree(pset);
> + /* When canceled, zone_pcp still points to boot_pageset[] */
> + if (zone_pcp(zone, cpu) != &boot_pageset[cpu]) {
> + zone_pcp(zone, cpu) = NULL;
> + kfree(pset);
> + }
> }
> }

Oh, I see what you mean.

Oh well, zeroing them all out in process_zones() will work.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/