From owner-freebsd-current@FreeBSD.ORG Mon Jul 23 19:18:41 2007 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C9D316A418; Mon, 23 Jul 2007 19:18:41 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from itchy.rabson.org (unknown [IPv6:2001:618:400::50b1:e8f2]) by mx1.freebsd.org (Postfix) with ESMTP id BADE913C4D9; Mon, 23 Jul 2007 19:18:40 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from [80.177.232.250] (herring.rabson.org [80.177.232.250]) by itchy.rabson.org (8.13.3/8.13.3) with ESMTP id l6NJIdFF083076; Mon, 23 Jul 2007 20:18:39 +0100 (BST) (envelope-from dfr@rabson.org) From: Doug Rabson To: Andrew Thompson In-Reply-To: <20070723031119.GA5541@heff.fud.org.nz> References: <200707211925.59698.dfr@rabson.org> <20070721210759.GA84580@heff.fud.org.nz> <20070721210837.GB84580@heff.fud.org.nz> <200707220858.12770.dfr@rabson.org> <20070723031119.GA5541@heff.fud.org.nz> Content-Type: text/plain Date: Mon, 23 Jul 2007 20:18:39 +0100 Message-Id: <1185218319.49715.0.camel@herring.rabson.org> Mime-Version: 1.0 X-Mailer: Evolution 2.10.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/3743/Mon Jul 23 18:44:24 2007 on itchy.rabson.org X-Virus-Status: Clean Cc: Attilio Rao , current@FreeBSD.org Subject: Re: if_bridge crash 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: Mon, 23 Jul 2007 19:18:41 -0000 On Mon, 2007-07-23 at 15:11 +1200, Andrew Thompson wrote: > On Sun, Jul 22, 2007 at 08:58:12AM +0100, Doug Rabson wrote: > > On Saturday 21 July 2007, Andrew Thompson wrote: > > > On Sun, Jul 22, 2007 at 09:07:59AM +1200, Andrew Thompson wrote: > > > > On Sat, Jul 21, 2007 at 08:38:59PM +0200, Attilio Rao wrote: > > > > > Doug Rabson wrote: > > > > > >I've been using if_bridge and if_tap to join various qemu > > > > > > virtual machines onto my local network. I use this script to > > > > > > set up the bridge: > > > > > > > > > > > >As far as I can see, the bridge code is calling copyout with a > > > > > > mutex held. Is that allowed? It doesn't sound like it should be > > > > > > allowed but I'm not quite up-to-date on that aspect of the > > > > > > current kernel api. > > > > > > > > > > Since a copyout() can generate a page fault (which can let the > > > > > thread sleep) it is not allowed to mantain neither a blockable > > > > > lock (mutex, rwlock) or a spinlock over a copyout. > > > > > > > > Please test this patch. > > > > > > One more time with the file attached. > > > > I still get a panic but I managed to get more information this time. The > > original panic was a WITNESS complaint (not sure why that put it into > > the debugger rather than just logging the LOR). > > It seems I didnt check all the places copyout was used, please test this > larger patch. > That did the trick, thanks.