diff options
author | David S. Miller <davem@davemloft.net> | 2019-11-09 11:04:37 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-09 11:04:37 -0800 |
commit | 14684b93019a2d2ece0df5acaf921924541b928d (patch) | |
tree | 29cf04da2f22b85b6051b47b3731e91a43d4c94d /net/vmw_vsock | |
parent | 92da362c07d413786ab59db1665376fb63805586 (diff) | |
parent | 0058b0a506e40d9a2c62015fe92eb64a44d78cd9 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
One conflict in the BPF samples Makefile, some fixes in 'net' whilst
we were converting over to Makefile.target rules in 'net-next'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/vmw_vsock')
-rw-r--r-- | net/vmw_vsock/virtio_transport_common.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index 193f959e51ef..828edd88488c 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -996,9 +996,11 @@ virtio_transport_recv_connected(struct sock *sk, if (le32_to_cpu(pkt->hdr.flags) & VIRTIO_VSOCK_SHUTDOWN_SEND) vsk->peer_shutdown |= SEND_SHUTDOWN; if (vsk->peer_shutdown == SHUTDOWN_MASK && - vsock_stream_has_data(vsk) <= 0) { - sock_set_flag(sk, SOCK_DONE); - sk->sk_state = TCP_CLOSING; + vsock_stream_has_data(vsk) <= 0 && + !sock_flag(sk, SOCK_DONE)) { + (void)virtio_transport_reset(vsk, NULL); + + virtio_transport_do_close(vsk, true); } if (le32_to_cpu(pkt->hdr.flags)) sk->sk_state_change(sk); |