diff options
author | Dexuan Cui <decui@microsoft.com> | 2017-10-19 03:33:14 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-21 02:21:08 +0100 |
commit | b4562ca7925a3bedada87a3dd072dd5bad043288 (patch) | |
tree | 09617e8799fad7a018b8d4548d8181034c54266c /net/vmw_vsock/virtio_transport.c | |
parent | 0a90e251988ceedc528c8db98f25b051cf190f44 (diff) |
hv_sock: add locking in the open/close/release code paths
Without the patch, when hvs_open_connection() hasn't completely established
a connection (e.g. it has changed sk->sk_state to SS_CONNECTED, but hasn't
inserted the sock into the connected queue), vsock_stream_connect() may see
the sk_state change and return the connection to the userspace, and next
when the userspace closes the connection quickly, hvs_release() may not see
the connection in the connected queue; finally hvs_open_connection()
inserts the connection into the queue, but we won't be able to purge the
connection for ever.
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Cathy Avery <cavery@redhat.com>
Cc: Rolf Neugebauer <rolf.neugebauer@docker.com>
Cc: Marcelo Cerri <marcelo.cerri@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/vmw_vsock/virtio_transport.c')
0 files changed, 0 insertions, 0 deletions