lkml.org 
[lkml]   [2022]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] cfg80211: fix dead lock for nl80211_new_interface()
From
Date
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

\
 
 \ /
  Last update: 2022-09-21 18:47    [W:0.036 / U:1.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site