[PATCH] Trivial - fix memory leak in free_percpu

From: Philip R Auld
Date: Fri Dec 17 2004 - 14:17:41 EST


Hi,
This fixes a memory leak where the percpu internal structure is
not freed. Repeated add/remove device illustrates the leak nicely.

Please apply.

Thanks,

Phil


Signed-off-by: Philip R. Auld <pauld@xxxxxxxxxxx>

diff -rupN linux-2.6.10-rc3-clean/mm/slab.c linux-2.6.10-rc3/mm/slab.c
--- linux-2.6.10-rc3-clean/mm/slab.c 2004-12-03 16:55:13.000000000 -0500
+++ linux-2.6.10-rc3/mm/slab.c 2004-12-17 11:08:45.377108680 -0500
@@ -2573,6 +2573,7 @@ free_percpu(const void *objp)
continue;
kfree(p->ptrs[i]);
}
+ kfree(p);
}

EXPORT_SYMBOL(free_percpu);

-
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/