Thread (1 message) 1 message, 1 author, 2009-04-15

Re: [PATCH 4/5] lguest: use KVM hypercalls

From: Eric W. Biederman <hidden>
Date: 2009-04-15 13:35:58
Also in: virtualization

Herbert Xu [off-list ref] writes:
On Wed, Apr 15, 2009 at 06:23:29AM -0700, Eric W. Biederman wrote:
quoted
There is a GIGANTIC reason to have the wait queue on tfile.

If you open a file, and do ip link del tapN you can still
be blocked waiting in poll.

The problem is specifically free_poll_entry, where we call
remove_wait_queue and fput without calling any file methods.
So all of this happens without struct tun_file's count being
elevated.  Which means tun_net_uninit can detach before we get
off of the stupid poll wait queue.
What about taking a netdev refcount before calling poll_wait?
Because as far as I can tell we would just leak that refcount.

The poll code does not appear to call back into any of the file
methods when it frees itself from the wait queue.

Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help