On Fri, 22 Sep 2006, KAMEZAWA Hiroyuki wrote:
> 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);
> + }
> }
> }
>
Regardless of whether the zone's per_cpu_pageset was set before the slab
allocator came up or not, it still needs to be NULL before returning from
here. Only when it is allocated through kmalloc_node does it need kfree,
however.
David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]