linux-stable/net
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
..
6lowpan
9p
802
8021q net: remove unnecessary variables and callback 2019-10-24 14:53:49 -07:00
appletalk
atm net: use skb_queue_empty_lockless() in poll() handlers 2019-10-28 13:33:41 -07:00
ax25
batman-adv Here are two batman-adv bugfixes: 2019-10-28 16:39:07 -07:00
bluetooth net: use skb_queue_empty_lockless() in poll() handlers 2019-10-28 13:33:41 -07:00
bpf
bpfilter
bridge bridge: ebtables: don't crash when using dnat target in output chains 2019-11-04 20:58:34 +01:00
caif net: use skb_queue_empty_lockless() in poll() handlers 2019-10-28 13:33:41 -07:00
can can: j1939: transport: j1939_xtp_rx_eoma_one(): Add sanity check for correct total message size 2019-11-04 21:47:23 +01:00
ceph
core net/tls: fix sk_msg trim on fallback to copy mode 2019-11-05 18:07:47 -08:00
dcb
dccp dccp: do not leak jiffies on the wire 2019-11-04 11:36:31 -08:00
decnet net: use skb_queue_empty_lockless() in poll() handlers 2019-10-28 13:33:41 -07:00
dns_resolver
dsa net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
ethernet
hsr
ieee802154 net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
ife
ipv4 ipv4: Fix table id reference in fib_sync_down_addr 2019-11-07 16:14:36 -08:00
ipv6 ipv6: fixes rt6_probe() and fib6_nh->last_probe init 2019-11-07 16:13:13 -08:00
iucv
kcm
key
l2tp net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
l3mdev
lapb
llc
mac80211 mac80211: fix station inactive_time shortly after boot 2019-11-08 09:17:28 +01:00
mac802154
mpls
ncsi
netfilter Merge branch 'master' of git://blackhole.kfki.hu/nf 2019-11-04 20:59:00 +01:00
netlabel
netlink
netrom net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
nfc nfc: netlink: fix double device reference drop 2019-11-07 15:23:19 -08:00
nsh
openvswitch netns: fix GFP flags in rtnl_net_notifyid() 2019-10-25 20:14:42 -07:00
packet
phonet net: use skb_queue_empty_lockless() in poll() handlers 2019-10-28 13:33:41 -07:00
psample
qrtr
rds
rfkill
rose net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
rxrpc rxrpc: Fix handling of last subpacket of jumbo packet 2019-10-31 12:23:09 -07:00
sched net: sched: prevent duplicate flower rules from tcf_proto destroy race 2019-11-05 17:47:26 -08:00
sctp inet: stop leaking jiffies on the wire 2019-11-01 14:57:52 -07:00
smc net/smc: fix ethernet interface refcounting 2019-11-06 17:44:32 -08:00
strparser
sunrpc SUNRPC: Destroy the back channel when we destroy the host transport 2019-10-30 12:04:35 -04:00
switchdev
tipc net: use skb_queue_empty_lockless() in poll() handlers 2019-10-28 13:33:41 -07:00
tls net/tls: add a TX lock 2019-11-06 17:33:32 -08:00
unix net: use skb_queue_empty_lockless() in poll() handlers 2019-10-28 13:33:41 -07:00
vmw_vsock vsock/virtio: fix sock refcnt holding during the shutdown 2019-11-08 12:17:50 -08:00
wimax
wireless nl80211: fix validation of mesh path nexthop 2019-10-30 10:11:18 +01:00
x25
xdp
xfrm
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c