Panic in netnatm
Craig Rodrigues
rodrigc at crodrigues.org
Wed Jul 27 21:48:26 GMT 2005
On Wed, Jul 27, 2005 at 10:35:34PM +0100, Robert Watson wrote:
> Otherwise, this looks good to me! (And I guess neither Harti or Bruce got
> a chance to test these code paths?)
Harti is on vacation until the end of August so I received no feedback from him.
I updated my patch based on your comments. What do you think?
--- if_atm.c.orig Tue Jul 26 10:28:42 2005
+++ if_atm.c Wed Jul 27 17:44:45 2005
@@ -221,6 +221,7 @@
* let native ATM know we are using this VCI/VPI
* (i.e. reserve it)
*/
+ NATM_LOCK();
sin = (struct sockaddr_in *) rt_key(rt);
if (sin->sin_family != AF_INET)
goto failed;
@@ -256,6 +257,7 @@
rt->rt_llinfo = NULL;
rt->rt_flags &= ~RTF_LLINFO;
}
+ NATM_UNLOCK();
#endif
/* mark as invalid. We cannot RTM_DELETE the route from
* here, because the recursive call to rtrequest1 does
@@ -269,10 +271,12 @@
* tell native ATM we are done with this VC
*/
if (rt->rt_flags & RTF_LLINFO) {
+ NATM_LOCK();
npcb_free((struct natmpcb *)rt->rt_llinfo,
NPCB_DESTROY);
rt->rt_llinfo = NULL;
rt->rt_flags &= ~RTF_LLINFO;
+ NATM_UNLOCK();
}
#endif
/*
--
Craig Rodrigues
rodrigc at crodrigues.org
More information about the freebsd-current
mailing list