Skip to content
Commit 9abf13c7 authored by Stephen Barber's avatar Stephen Barber Committed by Paul Gortmaker
Browse files

vsock/virtio: set SOCK_DONE on peer shutdown



commit 42f5cda5 upstream.

Set the SOCK_DONE flag to match the TCP_CLOSING state when a peer has
shut down and there is nothing left to read.

This fixes the following bug:
1) Peer sends SHUTDOWN(RDWR).
2) Socket enters TCP_CLOSING but SOCK_DONE is not set.
3) read() returns -ENOTCONN until close() is called, then returns 0.

Signed-off-by: default avatarStephen Barber <smbarber@chromium.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent ecb02834
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment