Re: if_bridge crash

From: Andrew Thompson <thompsa_at_FreeBSD.org>
Date: Mon, 23 Jul 2007 15:11:19 +1200
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.


cheers,
Andrew

Received on Mon Jul 23 2007 - 01:11:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:15 UTC