From owner-cvs-src@FreeBSD.ORG Sat Aug 27 01:25:23 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 018B116A41F; Sat, 27 Aug 2005 01:25:23 +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 84DD143D46; Sat, 27 Aug 2005 01:25:22 +0000 (GMT) (envelope-from thompsa@freebsd.org) Received: by heff.fud.org.nz (Postfix, from userid 1001) id 801B81CCD4; Sat, 27 Aug 2005 13:25:21 +1200 (NZST) Date: Sat, 27 Aug 2005 13:25:21 +1200 From: Andrew Thompson To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Message-ID: <20050827012521.GC44027@heff.fud.org.nz> References: <200508270117.j7R1Hgkw003979@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200508270117.j7R1Hgkw003979@repoman.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: Subject: Re: cvs commit: src/sys/net if_bridge.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2005 01:25:23 -0000 On Sat, Aug 27, 2005 at 01:17:42AM +0000, Andrew Thompson wrote: > thompsa 2005-08-27 01:17:42 UTC > > FreeBSD src repository > > Modified files: > sys/net if_bridge.c > Log: > Fix a panic in softclock() if the interface is destroyed with a bpf consumer > attached. > > This is caused by bpf_detachd clearing IFF_PROMISC on the interface which does > a SIOCSIFFLAGS ioctl. The problem here is that while the interface has been > stopped, IFF_UP has not been cleared so IFF_UP != IFF_DRV_RUNNING, this causes > the ioctl function to init() the interface which resets the callouts. > > The destroy then completes and frees the softc but softclock will panic on a > dead callout pointer. > > Ensure ifp->if_flags matches reality by clearing IFF_UP when we destroy. > Spotted by: pjd