Re: [PATCH net] vsock: fix potential deadlock in transport->release()

2020-02-27 Thread David Miller
From: Stefano Garzarella Date: Wed, 26 Feb 2020 11:58:18 +0100 > Some transports (hyperv, virtio) acquire the sock lock during the > .release() callback. > > In the vsock_stream_connect() we call vsock_assign_transport(); if > the socket was previously assigned to another transport, the > vsk->t

Re: [PATCH net] vsock: fix potential deadlock in transport->release()

2020-02-27 Thread Stefan Hajnoczi
On Wed, Feb 26, 2020 at 11:58:18AM +0100, Stefano Garzarella wrote: > Some transports (hyperv, virtio) acquire the sock lock during the > .release() callback. > > In the vsock_stream_connect() we call vsock_assign_transport(); if > the socket was previously assigned to another transport, the > vsk

[PATCH net] vsock: fix potential deadlock in transport->release()

2020-02-26 Thread Stefano Garzarella
Some transports (hyperv, virtio) acquire the sock lock during the .release() callback. In the vsock_stream_connect() we call vsock_assign_transport(); if the socket was previously assigned to another transport, the vsk->transport->release() is called, but the sock lock is already held in the vsock