From owner-freebsd-net@FreeBSD.ORG Tue Aug 7 12:05:45 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 806341065677; Tue, 7 Aug 2012 12:05:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 567808FC17; Tue, 7 Aug 2012 12:05:45 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AA2A8B946; Tue, 7 Aug 2012 08:05:44 -0400 (EDT) From: John Baldwin To: freebsd-net@freebsd.org Date: Tue, 7 Aug 2012 08:05:43 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201208070448.q774mVNm080900@freefall.freebsd.org> In-Reply-To: <201208070448.q774mVNm080900@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201208070805.43687.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 07 Aug 2012 08:05:44 -0400 (EDT) Cc: ae@freebsd.org Subject: Re: kern/168742: detaching of ethernet adapter with configured vlans leads to panic 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: Tue, 07 Aug 2012 12:05:45 -0000 On Tuesday, August 07, 2012 12:48:31 am ae@freebsd.org wrote: > Synopsis: detaching of ethernet adapter with configured vlans leads to panic > > Responsible-Changed-From-To: freebsd-bugs->freebsd-net > Responsible-Changed-By: ae > Responsible-Changed-When: Tue Aug 7 04:48:17 UTC 2012 > Responsible-Changed-Why: > Reassign. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=168742 Ugh, I thought I had fixed this in http://svnweb.freebsd.org/base?view=revision&revision=208212 I think the problem is the assertion is wrong. We could add a new DETACHING flag, but I think the simplest fix is to just remove it. I'm not sure if a similar assertion in if_delmulti_ifma() should also be removed. Index: if.c =================================================================== --- if.c (revision 238992) +++ if.c (working copy) @@ -3058,19 +3058,7 @@ if_delmulti(struct ifnet *ifp, struct sockaddr *sa { struct ifmultiaddr *ifma; int lastref; -#ifdef INVARIANTS - struct ifnet *oifp; - IFNET_RLOCK_NOSLEEP(); - TAILQ_FOREACH(oifp, &V_ifnet, if_link) - if (ifp == oifp) - break; - if (ifp != oifp) - ifp = NULL; - IFNET_RUNLOCK_NOSLEEP(); - - KASSERT(ifp != NULL, ("%s: ifnet went away", __func__)); -#endif if (ifp == NULL) return (ENOENT); -- John Baldwin