From owner-freebsd-bugs@FreeBSD.ORG Mon Mar 8 16:46:46 2004 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C98C816A4CE; Mon, 8 Mar 2004 16:46:46 -0800 (PST) Received: from ice.42.org (ice.42.org [194.77.3.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8232243D31; Mon, 8 Mar 2004 16:46:46 -0800 (PST) (envelope-from sec@42.org) Received: by ice.42.org (Postfix, from userid 1000) id 41D101C910; Tue, 9 Mar 2004 01:46:45 +0100 (CET) Date: Tue, 9 Mar 2004 01:46:45 +0100 From: Stefan `Sec` Zehl To: Brooks Davis Message-ID: <20040309004645.GD55352@ice.42.org> X-Current-Backlog: 1269 messages References: <20040304191443.67E9B1C8BA@ice.42.org> <200403041920.i24JK826047989@freefall.freebsd.org> <20040305181852.GC21713@ice.42.org> <20040305185527.GA16862@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040305185527.GA16862@Odin.AC.HMC.Edu> User-Agent: Mutt/1.4.1i I-love-doing-this: really X-Modeline: vim:set ts=8 sw=4 smarttab tw=72 si noic notitle: Accept-Languages: de, en X-URL: http://sec.42.org/ cc: freebsd-bugs@freebsd.org cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: kern/63772: tap device / exclusive open problem X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2004 00:46:46 -0000 On Fri, Mar 05, 2004 at 10:55 -0800, Brooks Davis wrote: [...] > > KASSERT(!(tp->tap_flags & TAP_OPEN), > > ("%s flags is out of sync", tp->tap_if.if_xname)); > > > > + if (tp->tap_flags & TAP_OPEN) > > + return (EBUSY); > > + [...] > There's obviously something complicated going on since with INVARIANTS > enabled this would either return EBUSY or panic. This should definitely > not be committed as is. I must admit, I don't understand the problem. this is an really simple if. Nothing is modified, and tp is not NULL, or the KASSERT above would be broken already. How do you get it to panic? It works fine for me. CU, Sec -- In 1968 it took the computing-Power of 2 C-64 to fly a rocket to the moon. Now, 1997 it takes the Power of a Pentium 133 to run Microsoft Windows 95. Something must have gone wrong.