From owner-freebsd-current@FreeBSD.ORG Wed Oct 5 20:52:29 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 C73A316A41F; Wed, 5 Oct 2005 20:52:29 +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 453BB43D46; Wed, 5 Oct 2005 20:52:29 +0000 (GMT) (envelope-from thompsa@freebsd.org) Received: by heff.fud.org.nz (Postfix, from userid 1001) id 1967F1CCD4; Thu, 6 Oct 2005 09:52:25 +1300 (NZDT) Date: Thu, 6 Oct 2005 09:52:25 +1300 From: Andrew Thompson To: Pawel Jakub Dawidek Message-ID: <20051005205224.GA75848@heff.fud.org.nz> Mail-Followup-To: Andrew Thompson , Pawel Jakub Dawidek , FreeBSD Current , Brooks Davis References: <20051005024903.GA72743@heff.fud.org.nz> <20051005203639.GA20552@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051005203639.GA20552@garage.freebsd.pl> User-Agent: Mutt/1.4.2.1i Cc: Brooks Davis , 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 20:52:29 -0000 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: > Looks good to me, I see that all the cloners use this order in their unload routine. if_stf and if_vlan are the only users of ifc_free_unit() and will both have this problem. /sys/contrib/pf/net/if_pflog.c /sys/contrib/pf/net/if_pfsync.c /sys/net/if_bridge.c /sys/net/if_disc.c /sys/net/if_faith.c /sys/net/if_gif.c /sys/net/if_gre.c /sys/net/if_ppp.c /sys/net/if_stf.c /sys/net/if_vlan.c /sys/netinet/ip_carp.c Andrew