Re: [PATCH net] tuntap: correctly wake up process during uninit

2016-05-18 Thread Jason Wang
On 2016年05月18日 21:01, Eric Dumazet wrote: On Wed, 2016-05-18 at 18:58 +0800, Jason Wang wrote: We used to check dev->reg_state against NETREG_REGISTERED after each time we are woke up. But after commit 9e641bdcfa4e ("net-tun: restructure tun_do_read for better sleep/wakeup efficiency"), it use

Re: [PATCH net] tuntap: correctly wake up process during uninit

2016-05-18 Thread Eric Dumazet
On Wed, 2016-05-18 at 18:58 +0800, Jason Wang wrote: > We used to check dev->reg_state against NETREG_REGISTERED after each > time we are woke up. But after commit 9e641bdcfa4e ("net-tun: > restructure tun_do_read for better sleep/wakeup efficiency"), it uses > skb_recv_datagram() which does not ch

Re: [PATCH net] tuntap: correctly wake up process during uninit

2016-05-18 Thread Michael S. Tsirkin
On Wed, May 18, 2016 at 06:58:17PM +0800, Jason Wang wrote: > We used to check dev->reg_state against NETREG_REGISTERED after each > time we are woke up. But after commit 9e641bdcfa4e ("net-tun: > restructure tun_do_read for better sleep/wakeup efficiency"), it uses > skb_recv_datagram() which does

[PATCH net] tuntap: correctly wake up process during uninit

2016-05-18 Thread Jason Wang
We used to check dev->reg_state against NETREG_REGISTERED after each time we are woke up. But after commit 9e641bdcfa4e ("net-tun: restructure tun_do_read for better sleep/wakeup efficiency"), it uses skb_recv_datagram() which does not check dev->reg_state. This will result if we delete a tun/tap d