netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Panic in ipv6_add_dev
@ 2003-06-10  0:55 Krishna Kumar
  2003-06-10  4:56 ` YOSHIFUJI Hideaki / 吉藤英明
  2003-06-12  6:22 ` David S. Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Krishna Kumar @ 2003-06-10  0:55 UTC (permalink / raw)
  To: kuznet, David S. Miller, netdev, linux-net

Hi,

I am using 2.5.70 and using VLAN to configure many interfaces, and after some 
are configured, the system panics in unregister_sysctl_table called from (STACK) 
neigh_sysctl_unregister, neigh_parms_release, ipv_add_dev. The problem is that 
we have called neigh_parms_alloc, but not neigh_sysctl_register. Hence calling 
neigh_parms_release() in the middle frees up the sysctl_header entry for the 
nd_table as a side-effect (due to the memcpy in neigh_parms_alloc).

We need to initialize sysctl_table to NULL in neigh_parms_alloc so that a 
release can be called safely at any time.

Thanks,

- KK

diff -ruN linux-2.5.70.org/net/core/neighbour.c linux-2.5.70/net/core/neighbour.c
--- linux-2.5.70.org/net/core/neighbour.c	2003-06-09 17:32:10.000000000 -0700
+++ linux-2.5.70/net/core/neighbour.c	2003-06-09 17:36:22.000000000 -0700
@@ -1094,6 +1094,7 @@
  			kfree(p);
  			return NULL;
  		}
+		p->sysctl_table = NULL;
  		write_lock_bh(&tbl->lock);
  		p->next		= tbl->parms.next;
  		tbl->parms.next = p;



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-06-12  6:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-10  0:55 [PATCH] Panic in ipv6_add_dev Krishna Kumar
2003-06-10  4:56 ` YOSHIFUJI Hideaki / 吉藤英明
2003-06-12  6:35   ` David S. Miller
2003-06-12  6:22 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).