[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190306.110307.755956027902807950.davem@davemloft.net>
Date: Wed, 06 Mar 2019 11:03:07 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: soheil.kdev@...il.com
Cc: netdev@...r.kernel.org, edumazet@...gle.com, ycheng@...gle.com,
ncardwell@...gle.com, soheil@...gle.com
Subject: Re: [PATCH net] tcp: do not report TCP_CM_INQ of 0 for closed
connections
From: Soheil Hassas Yeganeh <soheil.kdev@...il.com>
Date: Wed, 6 Mar 2019 13:01:36 -0500
> From: Soheil Hassas Yeganeh <soheil@...gle.com>
>
> Returning 0 as inq to userspace indicates there is no more data to
> read, and the application needs to wait for EPOLLIN. For a connection
> that has received FIN from the remote peer, however, the application
> must continue reading until getting EOF (return value of 0
> from tcp_recvmsg) or an error, if edge-triggered epoll (EPOLLET) is
> being used. Otherwise, the application will never receive a new
> EPOLLIN, since there is no epoll edge after the FIN.
>
> Return 1 when there is no data left on the queue but the
> connection has received FIN, so that the applications continue
> reading.
>
> Fixes: b75eba76d3d72 (tcp: send in-queue bytes in cmsg upon read)
> Signed-off-by: Soheil Hassas Yeganeh <soheil@...gle.com>
> Acked-by: Neal Cardwell <ncardwell@...gle.com>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Acked-by: Yuchung Cheng <ycheng@...gle.com>
Applied and queued up for -stable, thank you.
Powered by blists - more mailing lists