[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3e819d22808f7f1f232bc1242f2260106f37f875.camel@sipsolutions.net>
Date: Wed, 21 Sep 2022 18:36:18 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Aran Dalton <arda@...winnertech.com>, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] cfg80211: fix dead lock for nl80211_new_interface()
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
Powered by blists - more mailing lists