On Tue, 16 Oct 2007 14:33:38 -0700 Nish Aravamudan wrote:
Hi Nish,
Maybe. I can't tell without knowing the code better.
[make that patch, test it; test patch is below]
Well, it survives light testing (boot/init and a tarball download),
but I don't know how safe it is.
---
From: Randy Dunlap <randy.dunlap@oracle.com>
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 <randy.dunlap@oracle.com>
---
net/core/neighbour.c | 3 +++
1 file changed, 3 insertions(+)
--- linux-2.6.23-git7.orig/net/core/neighbour.c
+++ linux-2.6.23-git7/net/core/neighbour.c
@@ -1436,6 +1436,9 @@ int neigh_table_clear(struct neigh_table
free_percpu(tbl->stats);
tbl->stats = NULL;
+ kmem_cache_destroy(tbl->kmem_cachep);
+ tbl->kmem_cachep = NULL;
+
return 0;
}
-