From owner-freebsd-current@FreeBSD.ORG Mon Mar 26 12:26:27 2007 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BEA6216A400 for ; Mon, 26 Mar 2007 12:26:27 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.freebsd.org (Postfix) with ESMTP id 4328113C48A for ; Mon, 26 Mar 2007 12:26:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.4/8.13.3) with ESMTP id l2QCQOvw077761 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 Mar 2007 16:26:24 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.4/8.13.1/Submit) id l2QCQN1J077760; Mon, 26 Mar 2007 16:26:24 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 26 Mar 2007 16:26:23 +0400 From: Gleb Smirnoff To: Boris Samorodov Message-ID: <20070326122623.GR2713@FreeBSD.org> References: <20070325133125.X899@free.home.local> <20070325164936.K928@free.home.local> <54646144@bsam.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="R92lf0Oi2sxyK3LA" Content-Disposition: inline In-Reply-To: <54646144@bsam.ru> User-Agent: Mutt/1.5.6i Cc: freebsd-current@FreeBSD.org Subject: Re: panic in rtsock.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2007 12:26:27 -0000 --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--