VSOCK: Fix lockdep issue.
authorJorgen Hansen <jhansen@vmware.com>
Thu, 22 Oct 2015 15:25:25 +0000 (08:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Oct 2015 01:26:29 +0000 (18:26 -0700)
The recent fix for the vsock sock_put issue used the wrong
initializer for the transport spin_lock causing an issue when
running with lockdep checking.

Testing: Verified fix on kernel with lockdep enabled.

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/vmw_vsock/vmci_transport.c

index 5243ce2b2c18d85ca58314d717c175684b924f8d..7555cad83a752a930a54e4a8ca609846386e0ec1 100644 (file)
@@ -1570,7 +1570,7 @@ static int vmci_transport_socket_init(struct vsock_sock *vsk,
        vmci_trans(vsk)->notify_ops = NULL;
        INIT_LIST_HEAD(&vmci_trans(vsk)->elem);
        vmci_trans(vsk)->sk = &vsk->sk;
-       vmci_trans(vsk)->lock = __SPIN_LOCK_UNLOCKED(vmci_trans(vsk)->lock);
+       spin_lock_init(&vmci_trans(vsk)->lock);
        if (psk) {
                vmci_trans(vsk)->queue_pair_size =
                        vmci_trans(psk)->queue_pair_size;