[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ae6ebb34ba100fa8e17cc7eb187b7cfdf7a20a56.camel@sipsolutions.net>
Date: Fri, 25 Mar 2022 21:21:11 +0100
From: Johannes Berg <johannes@...solutions.net>
To: William McVicker <willmcvicker@...gle.com>
Cc: Jakub Kicinski <kuba@...nel.org>, linux-wireless@...r.kernel.org,
Marek Szyprowski <m.szyprowski@...sung.com>,
Kalle Valo <kvalo@...eaurora.org>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Amitkumar Karwar <amitkarwar@...il.com>,
Ganapathi Bhat <ganapathi.bhat@....com>,
Xinming Hu <huxinming820@...il.com>, kernel-team@...roid.com,
Paolo Abeni <pabeni@...hat.com>
Subject: Re: [BUG] deadlock in nl80211_vendor_cmd
On Fri, 2022-03-25 at 18:08 +0000, William McVicker wrote:
>
> I'm able to reproduce this issue pretty easily with a Pixel 6 when I add
> support to allow vendor commands to request for the RTNL.
>
Hm, wait, which of the two issues?
> For this case, I just
> delay unlocking the RTNL until nl80211_vendor_cmds() at which point I check the
> flags to see if I should unlock before calling doit(). That allows me to run my
> tests again and hit this issue. I imagine that I could hit this issue without
> any changes if I re-work my vendor ops to not need the RTNL.
What are the vendor ops doing though?
If they're actually unregistering a netdev - which I believe you
mentioned earlier - then that's quite clearly going to cause an issue,
if you unlock RTNL while the wiphy mutex is still held.
If not, then I don't see right now how you'd be able to trigger any
issue here at all.
The original issue - that you rtnl_lock() yourself while the wiphy mutex
is held - can't happen anymore with your rework I guess.
johannes
Powered by blists - more mailing lists