]> err.no Git - linux-2.6/commitdiff
[PATCH] do not free non slab allocated per_cpu_pageset
authorDavid Rientjes <rientjes@cs.washington.edu>
Mon, 25 Sep 2006 23:24:57 +0000 (16:24 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 00:38:36 +0000 (17:38 -0700)
Stops panic associated with attempting to free a non slab-allocated
per_cpu_pageset.

Signed-off-by: David Rientjes <rientjes@cs.washington.edu>
Acked-by: Christoph Lameter <clameter@sgi.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/page_alloc.c

index 3b5358a0561fa99366fbb9c7d2f858c40208b0fb..8a52ba9fe693bcf749486c3ec5ae6f1e26849700 100644 (file)
@@ -1845,8 +1845,10 @@ static inline void free_zone_pagesets(int cpu)
        for_each_zone(zone) {
                struct per_cpu_pageset *pset = zone_pcp(zone, cpu);
 
+               /* Free per_cpu_pageset if it is slab allocated */
+               if (pset != &boot_pageset[cpu])
+                       kfree(pset);
                zone_pcp(zone, cpu) = NULL;
-               kfree(pset);
        }
 }