if_bridge crash

Doug Rabson dfr at rabson.org
Mon Jul 23 19:18:41 UTC 2007


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.




More information about the freebsd-current mailing list