From owner-freebsd-net@FreeBSD.ORG Tue Aug 14 08:44:29 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 D1DB8106564A; Tue, 14 Aug 2012 08:44:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mail.kirov.so-ups.ru (mail.kirov.so-ups.ru [178.74.170.1]) by mx1.freebsd.org (Postfix) with ESMTP id 7D8C98FC23; Tue, 14 Aug 2012 08:44:29 +0000 (UTC) Received: from kas30pipe.localhost (localhost.kirov.so-ups.ru [127.0.0.1]) by mail.kirov.so-ups.ru (Postfix) with SMTP id 0C7E9B8027; Tue, 14 Aug 2012 12:44:28 +0400 (MSK) Received: from kirov.so-ups.ru (unknown [172.21.81.1]) by mail.kirov.so-ups.ru (Postfix) with ESMTP id 02B0FB8024; Tue, 14 Aug 2012 12:44:28 +0400 (MSK) Received: by ns.kirov.so-ups.ru (Postfix, from userid 1010) id EE2EABA0A2; Tue, 14 Aug 2012 12:44:27 +0400 (MSK) Received: from [127.0.0.1] (elsukov.kirov.oduur.so [10.118.3.52]) by ns.kirov.so-ups.ru (Postfix) with ESMTP id B58D1BA098; Tue, 14 Aug 2012 12:44:27 +0400 (MSK) Message-ID: <502A0FEA.1020808@FreeBSD.org> Date: Tue, 14 Aug 2012 12:44:26 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: John Baldwin References: <201208070448.q774mVNm080900@freefall.freebsd.org> <201208070805.43687.jhb@freebsd.org> In-Reply-To: <201208070805.43687.jhb@freebsd.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0284], KAS30/Release X-SpamTest-Info: Not protected Cc: freebsd-net@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, 14 Aug 2012 08:44:29 -0000 On 07.08.2012 16:05, John Baldwin wrote: > 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. Hi, John. This fixes the problem, thanks. > 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); > > -- WBR, Andrey V. Elsukov