aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_xarray.c
diff options
context:
space:
mode:
authorStefano Garzarella <[email protected]>2019-11-08 16:08:50 +0000
committerDavid S. Miller <[email protected]>2019-11-08 20:17:50 +0000
commitad8a7220355d39cddce8eac1cea9677333e8b821 (patch)
tree9801fe23b503700e860175db93a9f140d9447f30 /lib/test_xarray.c
parentMerge tag 'mac80211-for-net-2019-11-08' of git://git.kernel.org/pub/scm/linux... (diff)
downloadkernel-ad8a7220355d39cddce8eac1cea9677333e8b821.tar.gz
kernel-ad8a7220355d39cddce8eac1cea9677333e8b821.zip
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: 42f5cda5eaf4 ("vsock/virtio: set SOCK_DONE on peer shutdown") Cc: Stephen Barber <[email protected]> Signed-off-by: Stefano Garzarella <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/test_xarray.c')
0 files changed, 0 insertions, 0 deletions