Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Aug 2012 08:05:43 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-net@freebsd.org
Cc:        ae@freebsd.org
Subject:   Re: kern/168742: detaching of ethernet adapter with configured vlans leads to panic
Message-ID:  <201208070805.43687.jhb@freebsd.org>
In-Reply-To: <201208070448.q774mVNm080900@freefall.freebsd.org>
References:  <201208070448.q774mVNm080900@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208070805.43687.jhb>