tmp_suning_uos_patched/net/vmw_vsock
Stefano Garzarella ad8a722035 vsock/virtio: fix sock refcnt holding during the shutdown
The "42f5cda5eaf4" commit rightly set SOCK_DONE on peer shutdown,
but there is an issue if we receive the SHUTDOWN(RDWR) while the
virtio_transport_close_timeout() is scheduled.
In this case, when the timeout fires, the SOCK_DONE is already
set and the virtio_transport_close_timeout() will not call
virtio_transport_reset() and virtio_transport_do_close().
This causes that both sockets remain open and will never be released,
preventing the unloading of [virtio|vhost]_transport modules.

This patch fixes this issue, calling virtio_transport_reset() and
virtio_transport_do_close() when we receive the SHUTDOWN(RDWR)
and there is nothing left to read.

Fixes: 42f5cda5ea ("vsock/virtio: set SOCK_DONE on peer shutdown")
Cc: Stephen Barber <smbarber@chromium.org>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-11-08 12:17:50 -08:00
..
af_vsock_tap.c
af_vsock.c net: use skb_queue_empty_lockless() in poll() handlers 2019-10-28 13:33:41 -07:00
diag.c
hyperv_transport.c vsock: Fix a lockdep warning in __vsock_release() 2019-10-01 21:23:35 -04:00
Kconfig
Makefile
virtio_transport_common.c vsock/virtio: fix sock refcnt holding during the shutdown 2019-11-08 12:17:50 -08:00
virtio_transport.c vsock/virtio: limit the memory used per-socket 2019-07-30 15:00:00 -07:00
vmci_transport_notify_qstate.c
vmci_transport_notify.c
vmci_transport_notify.h
vmci_transport.c
vmci_transport.h
vsock_addr.c