From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] VSOCK: set POLLOUT | POLLWRNORM for TCP_CLOSING Date: Fri, 26 Jan 2018 11:17:01 -0500 (EST) Message-ID: <20180126.111701.1618019241717200752.davem@davemloft.net> References: <20180126114825.15817-1-stefanha@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, decui@microsoft.com, jhansen@vmware.com To: stefanha@redhat.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:47626 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932075AbeAZQRD (ORCPT ); Fri, 26 Jan 2018 11:17:03 -0500 In-Reply-To: <20180126114825.15817-1-stefanha@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Stefan Hajnoczi Date: Fri, 26 Jan 2018 11:48:25 +0000 > select(2) with wfds but no rfds must return when the socket is shut down > by the peer. This way userspace notices socket activity and gets -EPIPE > from the next write(2). > > Currently select(2) does not return for virtio-vsock when a SEND+RCV > shutdown packet is received. This is because vsock_poll() only sets > POLLOUT | POLLWRNORM for TCP_CLOSE, not the TCP_CLOSING state that the > socket is in when the shutdown is received. > > Signed-off-by: Stefan Hajnoczi Applied and queued up for -stable, thank you.