From: Johannes Berg <johannes@sipsolutions.net>
To: Aran Dalton <arda@allwinnertech.com>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] cfg80211: fix dead lock for nl80211_new_interface()
Date: Wed, 21 Sep 2022 18:36:18 +0200 [thread overview]
Message-ID: <3e819d22808f7f1f232bc1242f2260106f37f875.camel@sipsolutions.net> (raw)
In-Reply-To: <20220921091913.110749-1-arda@allwinnertech.com>
On Wed, 2022-09-21 at 17:19 +0800, Aran Dalton wrote:
> Both nl80211_new_interface and cfg80211_netdev_notifier_call hold the
> same wiphy_lock, then cause deadlock.
>
> The main call stack as bellow:
>
> nl80211_new_interface() takes wiphy_lock
> -> _nl80211_new_interface:
> -> rdev_add_virtual_intf
> -> rdev->ops->add_virtual_intf
> -> register_netdevice
The bug is yours, here, you're no longer allowed to call
register_netdevice() here.
If you have an out-of-tree driver that we couldn't update when doing
tree-wide changes, you probably shouldn't assume that the bug is
upstream and send random locking patches ... :)
johannes
prev parent reply other threads:[~2022-09-21 16:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 9:19 Aran Dalton
2022-09-21 9:19 ` [PATCH 2/2] cfg80211: fix dead lock for nl80211_del_interface() Aran Dalton
2022-09-21 15:03 ` [PATCH 1/2] cfg80211: fix dead lock for nl80211_new_interface() Jeff Johnson
2022-09-21 16:36 ` Johannes Berg [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=3e819d22808f7f1f232bc1242f2260106f37f875.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=arda@allwinnertech.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®