[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 3 Mar 2020 16:46:56 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Tommi Rantala <tommi.t.rantala@...ia.com>
Cc: stable@...r.kernel.org, Jason Wang <jasowang@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4.14] tuntap: correctly set SOCKWQ_ASYNC_NOSPACE
On Fri, Feb 28, 2020 at 10:42:16AM +0200, Tommi Rantala wrote:
> From: Jason Wang <jasowang@...hat.com>
>
> [ Upstream commit 2f3ab6221e4c87960347d65c7cab9bd917d1f637 ]
>
> 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>
> Signed-off-by: David S. Miller <davem@...emloft.net>
> Signed-off-by: Tommi Rantala <tommi.t.rantala@...ia.com>
> ---
> drivers/net/tun.c | 19 +++++++++++++++----
> 1 file changed, 15 insertions(+), 4 deletions(-)
Thanks for the backport, now queued up to 4.9.y and 4.14.y.
greg k-h
Powered by blists - more mailing lists