From: Leon Romanovsky <leon@kernel.org>
To: Lin Ma <linma@zju.edu.cn>
Cc: jgg@ziepe.ca, cmeiohas@nvidia.com, michaelgur@nvidia.com,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [bug report] RDMA/iwpm: reentrant iwpm hello message
Date: Tue, 24 Dec 2024 16:11:27 +0200 [thread overview]
Message-ID: <20241224141127.GH171473@unreal> (raw)
In-Reply-To: <103c061b.e87e.193f84b0840.Coremail.linma@zju.edu.cn>
On Tue, Dec 24, 2024 at 06:51:27PM +0800, Lin Ma wrote:
> Hello Leon,
>
> >
> > I'm not fully understand the lockdep here. We use down_read(), which is
> > reentry safe.
> >
>
> Really? To my knowledge, though down_read() itself will not trigger locking
> errors. But below scenario will lead to deadlock, and that's why this
> WARNING is raised.
>
> CPU0 CPU1
> ---- ----
> down_read()[1]
> down_write()[2]
> down_read()[3]
>
> If CPU1 thread not exists, the CPU0 will run smoothly (However, it will keep
> looping and the PoC cannot be killed by any signal, causing Denial-of-Service).
>
> When CPU1 calls down_write(), it will wait for [1] to be released.
> However, when [3] is called, it will then wait for [2] to be released,
> leading to a deadlock situation.
>
> Please let me know if I understand this correctly or incorrectly?
The thing is that down_write() is called when we unregistering module
which sent netlink messages. It shouldn't happen.
Thanks
>
> Thanks,
> Lin
next prev parent reply other threads:[~2024-12-24 14:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 15:32 [bug report] RDMA/iwpm: reentrant iwpm hello message Lin Ma
2024-12-24 9:29 ` Leon Romanovsky
2024-12-24 10:51 ` Lin Ma
2024-12-24 14:11 ` Leon Romanovsky [this message]
2024-12-24 16:16 ` Lin Ma
2024-12-24 19:26 ` Leon Romanovsky
2024-12-25 1:58 ` Lin Ma
2024-12-30 18:28 ` Leon Romanovsky
2025-01-08 15:14 ` Leon Romanovsky
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=20241224141127.GH171473@unreal \
--to=leon@kernel.org \
--cc=cmeiohas@nvidia.com \
--cc=jgg@ziepe.ca \
--cc=linma@zju.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=michaelgur@nvidia.com \
/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).