lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1iql6m24b.fsf@fess.ebiederm.org>
Date:	Wed, 15 Apr 2009 07:18:44 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	Patrick McHardy <kaber@...sh.net>,
	Matias Zabaljauregui <zabaljauregui@...il.com>, odie@...aau.dk,
	Rusty Russell <rusty@...tcorp.com.au>, lguest@...abs.org,
	virtualization@...ts.osdl.org,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Christian Borntraeger <borntraeger@...ibm.com>
Subject: Re: [Lguest] [PATCH 4/5] lguest: use KVM hypercalls

Herbert Xu <herbert@...dor.apana.org.au> writes:

> On Wed, Apr 15, 2009 at 07:06:10AM -0700, Eric W. Biederman wrote:
>>
>> There is the boring rmmod case that has always existed.
>> 
>> There is more interesting case of moving your tap device
>> into another network namespace.
>> 
>> In which case there is the possibility of the network namespace
>> exiting and destroying all of the virtual network devices before
>> we close the file handle.
>
> In that case what's the problem with holding a refcount to the
> unregistered device until the process owning the fd closes it?

Network devices do not hold a network namespace alive.  Only sockets
and processes do.

So holding the reference only blocks us indefinitely in
netdev_wait_allrefs, blocking the network namespace exit, and holding
net_mutex indefinitely.

My gut feel is that the socket needs to live in tun_file.  Instead
of in tun_struct.  Making that change looked just tricky enough
I couldn't sort through it when I glanced at the tun code, after I noticed
you had added a socket.

Eric
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ