From: Schspa Shi <schspa@gmail.com>
To: asmadeus@codewreck.org
Cc: ericvh@gmail.com, lucho@ionkov.net, linux_oss@crudebyte.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, v9fs-developer@lists.sourceforge.net,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] p9: trans_fd: Fix deadlock when connection cancel
Date: Thu, 01 Sep 2022 10:55:36 +0800 [thread overview]
Message-ID: <m2bkrz7qc8.fsf@gmail.com> (raw)
In-Reply-To: <Yw/HmHcmXBVIg/SW@codewreck.org>
asmadeus@codewreck.org writes:
> Schspa Shi wrote on Thu, Sep 01, 2022 at 02:09:50AM +0800:
>> To fix it, we can add extra reference counter to avoid deadlock, and
>> decrease it after we unlock the client->lock.
>
> Thanks for the patch!
>
> Unfortunately I already sent a slightly different version to the list,
> hidden in another syzbot thread, here:
> https://lkml.kernel.org/r/YvyD053bdbGE9xoo@codewreck.org
>
> (yes, sorry, not exactly somewhere I'd expect someone to find it... 9p
> hasn't had many contributors recently)
>
>
> Basically instead of taking an extra lock I just released the client
> lock before calling p9_client_cb, so it shouldn't hang anymore.
>
> We don't need the lock to call the cb as in p9_conn_cancel we already
> won't accept any new request and by this point the requests are in a
> local list that isn't shared anywhere.
>
Ok, thank you for pointing that out.
> If you have a test setup, would you mind testing my patch?
> That's the main reason I was delaying pushing it.
>
I have test it with my enviroment, it not hang anymore.
> Since you went out of your way to make this patch if you agree with my
> approach I don't mind adding your sign off or another mark of having
> worked on it.
>
> Thank you,
--
BRs
Schspa Shi
next prev parent reply other threads:[~2022-09-01 2:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 18:09 [PATCH] p9: trans_fd: Fix deadlock when connection cancel Schspa Shi
2022-08-31 20:42 ` asmadeus
2022-09-01 2:55 ` Schspa Shi [this message]
2022-09-01 15:27 ` Christian Schoenebeck
2022-09-04 6:42 ` asmadeus
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=m2bkrz7qc8.fsf@gmail.com \
--to=schspa@gmail.com \
--cc=asmadeus@codewreck.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ericvh@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=v9fs-developer@lists.sourceforge.net \
/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).