[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241224141127.GH171473@unreal>
Date: Tue, 24 Dec 2024 16:11:27 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Lin Ma <linma@....edu.cn>
Cc: jgg@...pe.ca, cmeiohas@...dia.com, michaelgur@...dia.com,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [bug report] RDMA/iwpm: reentrant iwpm hello message
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
Powered by blists - more mailing lists