From owner-cvs-src@FreeBSD.ORG Tue Aug 30 20:30:44 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 CBB3516A41F; Tue, 30 Aug 2005 20:30:44 +0000 (GMT) (envelope-from thompsa@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3F9043D46; Tue, 30 Aug 2005 20:30:44 +0000 (GMT) (envelope-from thompsa@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j7UKUilc007916; Tue, 30 Aug 2005 20:30:44 GMT (envelope-from thompsa@repoman.freebsd.org) Received: (from thompsa@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j7UKUihd007915; Tue, 30 Aug 2005 20:30:44 GMT (envelope-from thompsa) Message-Id: <200508302030.j7UKUihd007915@repoman.freebsd.org> From: Andrew Thompson Date: Tue, 30 Aug 2005 20:30:44 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: 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: Tue, 30 Aug 2005 20:30:44 -0000 thompsa 2005-08-30 20:30:44 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/net if_bridge.c Log: MFC: if_bridge, r1.20 > 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. Approved by: re (kensmith), mlaier (mentor) Revision Changes Path 1.11.2.9 +1 -0 src/sys/net/if_bridge.c