From: Maximilian Luz <luzmaximilian@gmail.com>
To: Johannes Berg <johannes.berg@intel.com>, linux-wireless@vger.kernel.org
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
Kalle Valo <kvalo@codeaurora.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Amitkumar Karwar <amitkarwar@gmail.com>,
Ganapathi Bhat <ganapathi.bhat@nxp.com>,
Xinming Hu <huxinming820@gmail.com>,
dave@bewaar.me
Subject: Re: [BUG] Deadlock in _cfg80211_unregister_wdev()
Date: Fri, 14 May 2021 15:46:11 +0200 [thread overview]
Message-ID: <da9f48e0-42fe-1f27-6ed8-ea796f95f894@gmail.com> (raw)
In-Reply-To: <98392296-40ee-6300-369c-32e16cff3725@gmail.com>
On 5/14/21 1:07 AM, Maximilian Luz wrote:
> Following commit a05829a7222e ("cfg80211: avoid holding the RTNL when
> calling the driver"), the mwifiex_pcie module fails to unload. This also
> prevents the device from rebooting / shutting down.
>
> Attempting to unload the module produces the log pasted below. Upon
> further investigation, this looks like a deadlock inside
> _cfg80211_unregister_wdev():
>
> - According to [1], this function expects the rdev->wiphy.mtx to be
> held.
> - Down the line, this function (through some indirections, see third
> trace in log below) calls call_netdevice_notifiers(NETDEV_GOING_DOWN,
> ...) [2].
> - One of the registered notifiers seems to be
> cfg80211_netdev_notifier_call(), which attempts to lock
> rdev->wiphy.mtx again [3], completing the deadlock.
Looks like the underlying issue also leads to
https://lore.kernel.org/linux-wireless/ab4d00ce52f32bd8e45ad0448a44737e@bewaar.me/
Regards,
Max
prev parent reply other threads:[~2021-05-14 13:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-13 23:07 [BUG] Deadlock in _cfg80211_unregister_wdev() Maximilian Luz
2021-05-14 8:26 ` Johannes Berg
2021-05-14 11:40 ` Maximilian Luz
2021-05-15 2:44 ` Brian Norris
2021-05-15 11:24 ` Maximilian Luz
2021-05-14 13:46 ` Maximilian Luz [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=da9f48e0-42fe-1f27-6ed8-ea796f95f894@gmail.com \
--to=luzmaximilian@gmail.com \
--cc=amitkarwar@gmail.com \
--cc=dave@bewaar.me \
--cc=davem@davemloft.net \
--cc=ganapathi.bhat@nxp.com \
--cc=huxinming820@gmail.com \
--cc=johannes.berg@intel.com \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=netdev@vger.kernel.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).