From owner-freebsd-current@FreeBSD.ORG Wed Oct 5 21:09:51 2005 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D638116A41F; Wed, 5 Oct 2005 21:09:51 +0000 (GMT) (envelope-from thompsa@freebsd.org) Received: from heff.fud.org.nz (60-234-149-201.bitstream.orcon.net.nz [60.234.149.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47CCF43D46; Wed, 5 Oct 2005 21:09:51 +0000 (GMT) (envelope-from thompsa@freebsd.org) Received: by heff.fud.org.nz (Postfix, from userid 1001) id 21DEA1CCDD; Thu, 6 Oct 2005 10:09:50 +1300 (NZDT) Date: Thu, 6 Oct 2005 10:09:50 +1300 From: Andrew Thompson To: Brooks Davis Message-ID: <20051005210950.GB75848@heff.fud.org.nz> Mail-Followup-To: Andrew Thompson , Brooks Davis , Pawel Jakub Dawidek , FreeBSD Current , Brooks Davis References: <20051005024903.GA72743@heff.fud.org.nz> <20051005203639.GA20552@garage.freebsd.pl> <20051005205515.GA30350@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051005205515.GA30350@odin.ac.hmc.edu> User-Agent: Mutt/1.4.2.1i Cc: Brooks Davis , Pawel Jakub Dawidek , FreeBSD Current Subject: Re: panic: ifc_free_unit: bit is already cleared 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: Wed, 05 Oct 2005 21:09:52 -0000 On Wed, Oct 05, 2005 at 01:55:15PM -0700, Brooks Davis wrote: > On Wed, Oct 05, 2005 at 10:36:39PM +0200, Pawel Jakub Dawidek wrote: > > On Wed, Oct 05, 2005 at 03:49:03PM +1300, Andrew Thompson wrote: > > +> Hi, > > +> > > +> I have found a repeatable panic with network device cloning, unfortunatly I am > > +> unable to dump on this box. This is sparc64 with a 2 day old current. > > > > The order is wrong in vlan_modevent(). > > > > if_clone_detach() is freeing ifc_units field, so ifc_free_unit() should not > > be called after that. > > > > This patch should fix the problem: > > > > http://people.freebsd.org/~pjd/patches/if_vlan.c.patch > > Yes. This does introduce a race in that a new interface could > be created between the vlan_clone_destroy loop and the call to > if_clone_detach. I dont think this is the problem. IF_CLONE_REMREF(ifc) is freeing ifc->ifc_units in if_clone_detach(). It look like the ref counting isnt working quite right. Andrew