linux-stable/net/vmw_vsock
Jorgen Hansen afbea2cd25 VSOCK: Don't call vsock_stream_has_data in atomic context
When using the host personality, VMCI will grab a mutex for any
queue pair access. In the detach callback for the vmci vsock
transport, we call vsock_stream_has_data while holding a spinlock,
and vsock_stream_has_data will access a queue pair.

To avoid this, we can simply omit calling vsock_stream_has_data
for host side queue pairs, since the QPs are empty per default
when the guest has detached.

This bug affects users of VMware Workstation using kernel version
4.4 and later.

Testing: Ran vsock tests between guest and host, and verified that
with this change, the host isn't calling vsock_stream_has_data
during detach. Ran mixedTest between guest and host using both
guest and host as server.

v2: Rebased on top of recent change to sk_state values
Reviewed-by: Adit Ranadive <aditr@vmware.com>
Reviewed-by: Aditya Sarwade <asarwade@vmware.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-26 04:21:50 +09:00
..
af_vsock.c vsock: always call vsock_init_tables() 2017-10-26 17:45:58 +09:00
af_vsock_tap.c VSOCK: Add vsockmon tap functions 2017-04-24 12:35:56 -04:00
diag.c VSOCK: add sock_diag interface 2017-10-05 18:44:17 -07:00
hyperv_transport.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-10-22 13:39:14 +01:00
Kconfig VSOCK: add sock_diag interface 2017-10-05 18:44:17 -07:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
virtio_transport.c VSOCK: use TCP state constants for sk_state 2017-10-05 18:44:17 -07:00
virtio_transport_common.c VSOCK: use TCP state constants for sk_state 2017-10-05 18:44:17 -07:00
vmci_transport.c VSOCK: Don't call vsock_stream_has_data in atomic context 2017-11-26 04:21:50 +09:00
vmci_transport.h VSOCK: constify vmci_transport_notify_ops structures 2015-11-23 15:49:29 -05:00
vmci_transport_notify.c VSOCK: use TCP state constants for sk_state 2017-10-05 18:44:17 -07:00
vmci_transport_notify.h VSOCK: constify vmci_transport_notify_ops structures 2015-11-23 15:49:29 -05:00
vmci_transport_notify_qstate.c VSOCK: use TCP state constants for sk_state 2017-10-05 18:44:17 -07:00
vsock_addr.c VSOCK: Move af_vsock.h and vsock_addr.h to include/net 2013-07-27 22:14:06 -07:00