[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180523.143240.210663170832759811.davem@davemloft.net>
Date: Wed, 23 May 2018 14:32:40 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: jasowang@...hat.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
mst@...hat.com, hannes@...essinduktion.org, edumazet@...gle.com
Subject: Re: [PATCH net] tuntap: correctly set SOCKWQ_ASYNC_NOSPACE
From: Jason Wang <jasowang@...hat.com>
Date: Tue, 22 May 2018 14:21:04 +0800
> When link is down, writes to the device might fail with
> -EIO. Userspace needs an indication when the status is resolved. As a
> fix, tun_net_open() attempts to wake up writers - but that is only
> effective if SOCKWQ_ASYNC_NOSPACE has been set in the past. This is
> not the case of vhost_net which only poll for EPOLLOUT after it meets
> errors during sendmsg().
>
> This patch fixes this by making sure SOCKWQ_ASYNC_NOSPACE is set when
> socket is not writable or device is down to guarantee EPOLLOUT will be
> raised in either tun_chr_poll() or tun_sock_write_space() after device
> is up.
>
> Cc: Hannes Frederic Sowa <hannes@...essinduktion.org>
> Cc: Eric Dumazet <edumazet@...gle.com>
> Fixes: 1bd4978a88ac2 ("tun: honor IFF_UP in tun_get_user()")
> Signed-off-by: Jason Wang <jasowang@...hat.com>
Applied and queued up for -stable, thanks Jason.
Powered by blists - more mailing lists