Re: atm: panic when loading clip 2nd time

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Randy Dunlap
Date: Friday, October 19, 2007 - 6:02 pm

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;
 }
 
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
atm: panic when loading clip 2nd time, Randy Dunlap, (Tue Oct 16, 2:04 pm)
Re: atm: panic when loading clip 2nd time, Nish Aravamudan, (Tue Oct 16, 2:33 pm)
Re: atm: panic when loading clip 2nd time, Randy Dunlap, (Fri Oct 19, 6:02 pm)
Re: atm: panic when loading clip 2nd time, David Miller, (Sun Oct 21, 4:24 pm)