Re: [1/2] tun: Only free a netdev when all tun descriptors are closed

2009-04-18 Thread Herbert Xu
On Sat, Apr 18, 2009 at 10:09:39PM +0300, Michael S. Tsirkin wrote: > > Does this work with TUN_PERSIST off? > I haven't tested this, but won't unregister_netdev block forever > waiting for device reference to become 0? Maybe you want > > + tun_put(tun); > + if (!(tun->fla

Re: [1/2] tun: Only free a netdev when all tun descriptors are closed

2009-04-18 Thread Michael S. Tsirkin
On Fri, Apr 17, 2009 at 08:09:23AM +0800, Herbert Xu wrote: > On Thu, Apr 16, 2009 at 10:57:45PM +0300, Michael S. Tsirkin wrote: > > > > This last bit seems to make a simple test using a non-persistent tap device > > deadlock for me: we don't drop a reference acquired with __tun_get sock > > unreg