From: Stefano Garzarella <sgarzare@redhat.com>
To: Hillf Danton <hdanton@sina.com>
Cc: Dexuan Cui <decui@microsoft.com>,
Jorgen Hansen <jhansen@vmware.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
syzbot <syzbot+731710996d79d0d58fbc@syzkaller.appspotmail.com>,
davem@davemloft.net, kuba@kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
syzkaller-bugs@googlegroups.com,
virtualization@lists.linux-foundation.org
Subject: Re: INFO: task hung in lock_sock_nested (2)
Date: Tue, 25 Feb 2020 10:07:32 +0100 [thread overview]
Message-ID: <20200225090732.kge6bdf46ji6mbb5@steredhat> (raw)
In-Reply-To: <20200224134428.12256-1-hdanton@sina.com>
On Mon, Feb 24, 2020 at 09:44:28PM +0800, Hillf Danton wrote:
>
> On Mon, 24 Feb 2020 11:08:53 +0100 Stefano Garzarella wrote:
> > On Sun, Feb 23, 2020 at 03:50:25PM +0800, Hillf Danton wrote:
> > >
> > > Seems like vsock needs a word to track lock owner in an attempt to
> > > avoid trying to lock sock while the current is the lock owner.
> >
> > Thanks for this possible solution.
> > What about using sock_owned_by_user()?
> >
> No chance for vsock_locked() if it works.
>
> > We should fix also hyperv_transport, because it could suffer from the same
> > problem.
> >
> You're right. My diff is at most for introducing vsk's lock owner.
Sure, thanks for this!
>
> > At this point, it might be better to call vsk->transport->release(vsk)
> > always with the lock taken and remove it in the transports as in the
> > following patch.
> >
> > What do you think?
> >
> Yes and ... please take a look at the output of grep
>
> grep -n lock_sock linux/net/vmw_vsock/af_vsock.c
>
> as it drove me mad.
:-) I'll go in this direction and I'll check all the cases.
We should avoid to take lock_sock in the transports when it is possible.
Thanks for the help,
Stefano
prev parent reply other threads:[~2020-02-25 9:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-22 18:58 INFO: task hung in lock_sock_nested (2) syzbot
2020-02-23 7:50 ` Hillf Danton
2020-02-24 10:08 ` Stefano Garzarella
2020-02-25 5:44 ` Dexuan Cui
2020-02-25 8:30 ` Stefano Garzarella
2020-02-24 13:44 ` Hillf Danton
2020-02-25 9:07 ` Stefano Garzarella [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200225090732.kge6bdf46ji6mbb5@steredhat \
--to=sgarzare@redhat.com \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=hdanton@sina.com \
--cc=jhansen@vmware.com \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stefanha@redhat.com \
--cc=syzbot+731710996d79d0d58fbc@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).