From owner-freebsd-net@FreeBSD.ORG Mon Mar 16 20:14:11 2009 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5256106570A; Mon, 16 Mar 2009 20:14:11 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 656558FC1F; Mon, 16 Mar 2009 20:14:11 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n2GKEApH073903 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 16 Mar 2009 13:14:10 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <49BEB312.7060105@freebsd.org> Date: Mon, 16 Mar 2009 13:14:10 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Coleman Kane References: <1236937253.2282.0.camel@localhost> <49BAEA9F.8020302@incunabulum.net> <49BB0D3E.2020306@incunabulum.net> <49BC1C66.7030400@freebsd.org> <1237233210.84180.20.camel@localhost> In-Reply-To: <1237233210.84180.20.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: Bruce Simpson , current@freebsd.org, freebsd-net Subject: Re: IGMP+WiFi panic on recent kernel - in igmp_fasttimo() X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2009 20:14:12 -0000 It is the same issue but the root cause is unclear. There is much code that does assumes ifma_protospec might be NULL and checks for it. In my case (creating a wlan ifnet and then destroying it on eject) the patch below is sufficient. I don't care to dig right now to understand how this stuff is supposed to work; it should be clear from comments etc but the code is lacking. Sam Coleman Kane wrote: > The crash that I am seeing (using if_ndis) occurs in igmp_fasttimo... > This patch doesn't fix that, I'll get more info as soon as I can. > > On Sat, 2009-03-14 at 14:06 -0700, Sam Leffler wrote: > >> This patches avoids the crash. Not sure how ifma_protospec is supposed >> to be handled so I'm not committing it. >> >> Sam >> >> plain text document attachment (mcast.patch) >> Index: in.c >> =================================================================== >> --- in.c (revision 189750) >> +++ in.c (working copy) >> @@ -1040,7 +1040,8 @@ >> */ >> IF_ADDR_LOCK(ifp); >> TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { >> - if (ifma->ifma_addr->sa_family != AF_INET) >> + if (ifma->ifma_addr->sa_family != AF_INET || >> + ifma->ifma_protospec == NULL) >> continue; >> inm = (struct in_multi *)ifma->ifma_protospec; >> LIST_INSERT_HEAD(&purgeinms, inm, inm_link); >> Index: igmp.c >> =================================================================== >> --- igmp.c (revision 189750) >> +++ igmp.c (working copy) >> @@ -623,7 +623,8 @@ >> if (igi->igi_version == IGMP_VERSION_3) { >> IF_ADDR_LOCK(ifp); >> TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { >> - if (ifma->ifma_addr->sa_family != AF_INET) >> + if (ifma->ifma_addr->sa_family != AF_INET || >> + ifma->ifma_protospec == NULL) >> continue; >> inm = (struct in_multi *)ifma->ifma_protospec; >> if (inm->inm_state == IGMP_LEAVING_MEMBER) { >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >>