RE: [PATCH] vsock: Fix a lockdep warning in __vsock_release()

From: Dexuan Cui
Date: Wed Sep 25 2019 - 21:10:32 EST


> From: Stefano Garzarella <sgarzare@xxxxxxxxxx>
> Sent: Thursday, August 22, 2019 3:25 AM
> > [...snipped...]
> > --- a/net/vmw_vsock/hyperv_transport.c
> > +++ b/net/vmw_vsock/hyperv_transport.c
> > @@ -559,7 +559,7 @@ static void hvs_release(struct vsock_sock *vsk)
> > struct sock *sk = sk_vsock(vsk);
> > bool remove_sock;
> >
> > - lock_sock(sk);
> > + lock_sock_nested(sk, SINGLE_DEPTH_NESTING);
>
> Should we update also other transports?
>
> Stefano

Hi Stefano,
Sorry for the late reply! I'll post a v2 shortly.

As I checked, hyperv socket and virtio socket need to be fixed.

The vmci socket code doesn't acquire the sock lock in the release
callback, so it doesn't need any fix.

Thanks,
-- Dexuan