From: Randy Dunlap Date: Sun, 21 Oct 2007 23:24:27 +0000 (-0700) Subject: [ATM]: Fix clip module reload crash. X-Git-Tag: v2.6.24-rc1~62^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfb85c9f753a7172bd962e8717118191dfd612cc;p=linux-2.6 [ATM]: Fix clip module reload crash. net/atm/clip.c crashes the kernel if it (module) is loaded, removed, and then loaded again. Its exit call to neigh_table_clear() should destroy the cache after freeing it. Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller --- diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 67ba9914e5..05979e3569 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1438,6 +1438,9 @@ int neigh_table_clear(struct neigh_table *tbl) free_percpu(tbl->stats); tbl->stats = NULL; + kmem_cache_destroy(tbl->kmem_cachep); + tbl->kmem_cachep = NULL; + return 0; }