Date: Mon, 26 Mar 2007 16:26:23 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Boris Samorodov <bsam@ipt.ru> Cc: freebsd-current@FreeBSD.org Subject: Re: panic in rtsock.c Message-ID: <20070326122623.GR2713@FreeBSD.org> In-Reply-To: <54646144@bsam.ru> References: <20070325133125.X899@free.home.local> <20070325164936.K928@free.home.local> <54646144@bsam.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
--R92lf0Oi2sxyK3LA
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
  Boris, Yuriy,
On Mon, Mar 26, 2007 at 03:33:03AM +0400, Boris Samorodov wrote:
B> On Sun, 25 Mar 2007 16:57:35 +0400 (MSD) Yuriy Tsibizov wrote:
B> 
B> > > I'm getting repeatable panic with kernel & userland from yesterday
B> > > evening when I try to connect to Internet using bluetooth to connect
B> > > to my phone:
B> > > "rfcomm_pppd -a e60 -c -C dun -l mts".
B> 
B> > The same panic accurs when I use /usr/sbin/ppp (with old V.34 modem).
B> > It does not panic (in rtsock.c) when I use mpd.
B> 
B> The same here, panic when ppp is started. Any news?
Can you please try the attached patch?
-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
--R92lf0Oi2sxyK3LA
Content-Type: text/plain; charset=koi8-r
Content-Disposition: attachment; filename="rtsock.c.diff"
Index: rtsock.c
===================================================================
RCS file: /home/ncvs/src/sys/net/rtsock.c,v
retrieving revision 1.140
diff -u -p -r1.140 rtsock.c
--- rtsock.c	22 Mar 2007 10:51:03 -0000	1.140
+++ rtsock.c	26 Mar 2007 09:44:53 -0000
@@ -514,7 +514,9 @@ route_output(struct mbuf *m, struct sock
 					senderr(error);
 				RT_LOCK(rt);
 			}
-			if (info.rti_ifa != rt->rt_ifa && rt->rt_ifa != NULL &&
+			if (info.rti_ifa != NULL &&
+			    info.rti_ifa != rt->rt_ifa &&
+			    rt->rt_ifa != NULL &&
 			    rt->rt_ifa->ifa_rtrequest != NULL) {
 				rt->rt_ifa->ifa_rtrequest(RTM_DELETE, rt,
 				    &info);
@@ -528,12 +530,11 @@ route_output(struct mbuf *m, struct sock
 				}
 				rt->rt_flags |= RTF_GATEWAY;
 			}
-			if (info.rti_ifa != rt->rt_ifa) {
+			if (info.rti_ifa != NULL &&
+			    info.rti_ifa != rt->rt_ifa) {
+				IFAREF(info.rti_ifa);
 				rt->rt_ifa = info.rti_ifa;
-				if (info.rti_ifa != NULL) {
-					IFAREF(info.rti_ifa);
-					rt->rt_ifp = info.rti_ifp;
-				}
+				rt->rt_ifp = info.rti_ifp;
 			}
 			/* Allow some flags to be toggled on change. */
 			if (rtm->rtm_fmask & RTF_FMASK)
--R92lf0Oi2sxyK3LA--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070326122623.GR2713>
