summaryrefslogtreecommitdiff
path: root/net/vmw_vsock/vmci_transport.h
diff options
context:
space:
mode:
authorJorgen Hansen <jhansen@vmware.com>2015-10-21 14:53:56 +0300
committerDavid S. Miller <davem@davemloft.net>2015-10-22 17:21:05 +0300
commit4ef7ea9195ea73262cd9730fb54e1eb726da157b (patch)
tree0301ce5f59efd5311d6d7ae2b736feda283967fa /net/vmw_vsock/vmci_transport.h
parent47191d65b647af5eb5c82ede70ed4c24b1e93ef4 (diff)
downloadlinux-4ef7ea9195ea73262cd9730fb54e1eb726da157b.tar.xz
VSOCK: sock_put wasn't safe to call in interrupt context
In the vsock vmci_transport driver, sock_put wasn't safe to call in interrupt context, since that may call the vsock destructor which in turn calls several functions that should only be called from process context. This change defers the callling of these functions to a worker thread. All these functions were deallocation of resources related to the transport itself. Furthermore, an unused callback was removed to simplify the cleanup. Multiple customers have been hitting this issue when using VMware tools on vSphere 2015. Also added a version to the vmci transport module (starting from 1.0.2.0-k since up until now it appears that this module was sharing version with vsock that is currently at 1.0.1.0-k). Reviewed-by: Aditya Asarwade <asarwade@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Jorgen Hansen <jhansen@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/vmw_vsock/vmci_transport.h')
-rw-r--r--net/vmw_vsock/vmci_transport.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/vmw_vsock/vmci_transport.h b/net/vmw_vsock/vmci_transport.h
index ce6c9623d5f0..2ad46f39649f 100644
--- a/net/vmw_vsock/vmci_transport.h
+++ b/net/vmw_vsock/vmci_transport.h
@@ -119,10 +119,12 @@ struct vmci_transport {
u64 queue_pair_size;
u64 queue_pair_min_size;
u64 queue_pair_max_size;
- u32 attach_sub_id;
u32 detach_sub_id;
union vmci_transport_notify notify;
struct vmci_transport_notify_ops *notify_ops;
+ struct list_head elem;
+ struct sock *sk;
+ spinlock_t lock; /* protects sk. */
};
int vmci_transport_register(void);