Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex"
PATCH 1/1 Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex"
This reverts commit 268f84a827534c4e4c2540a4e29daa73359fc0a5.
The reverted commit is based on implementation of wiphy locking that isn't planned to redo on a stable kernel, so revert it to avoid warning:
WARNING: CPU: 0 PID: 9 at net/wireless/core.h:231 disconnect_work+0xb8/0x144 [cfg80211] CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 6.6.51-00141-ga1649b6f8ed6 #7 Hardware name: Freescale i.MX6 SoloX (Device Tree) Workqueue: events disconnect_work [cfg80211] unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x58/0x70 dump_stack_lvl from __warn+0x70/0x1c0 __warn from warn_slowpath_fmt+0x16c/0x294 warn_slowpath_fmt from disconnect_work+0xb8/0x144 [cfg80211] disconnect_work [cfg80211] from process_one_work+0x204/0x620 process_one_work from worker_thread+0x1b0/0x474 worker_thread from kthread+0x10c/0x12c kthread from ret_from_fork+0x14/0x24
--- net/wireless/core.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
net/wireless/core.h +1 -7
@@ -228,7 +228,6 @@ void cfg80211_register_wdev(struct cfg80211_registered_device *rdev,static inline void wdev_lock (struct wireless_dev *wdev)__acquires (wdev) { -lockdep_assert_held (&wdev->wiphy->mtx);mutex_lock (&wdev->mtx);__acquire (wdev->mtx); }
@@ -236,16 +235,11 @@ static inline void wdev_lock(struct wireless_dev *wdev)static inline void wdev_unlock (struct wireless_dev *wdev)__releases (wdev) { -lockdep_assert_held (&wdev->wiphy->mtx);__release (wdev->mtx);mutex_unlock (&wdev->mtx); } -static inline void ASSERT_WDEV_LOCK (struct wireless_dev *wdev) -{ -lockdep_assert_held (&wdev->wiphy->mtx); -lockdep_assert_held (&wdev->mtx); -} +#define ASSERT_WDEV_LOCK (wdev) lockdep_assert_held(&(wdev)->mtx)static inline bool cfg80211_has_monitors_only (struct cfg80211_registered_device *rdev) {
Signature · 1 line
2.25.1
The patch being reverted was also backported to 5.15 and 6.1 stables where it's causing the same splats.
https://lore.kernel.org/stable/[email protected]/
I've sent the reverts for those branches, too:
- 5.15 https://lore.kernel.org/stable/[email protected]/
- 6.1 https://lore.kernel.org/stable/[email protected]/
Greg KH
maintainerQuoted 19 lines · Ping-Ke Shih
This reverts commit
268f84a827534c4e4c2540a4e29daa73359fc0a5.The reverted commit is based on implementation of wiphy locking that isn't planned to redo on a stable kernel, so revert it to avoid warning:
WARNING: CPU: 0 PID: 9 at net/wireless/core.h:231 disconnect_work+0xb8/0x144 [cfg80211] CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 6.6.51-00141-ga1649b6f8ed6 #7 Hardware name: Freescale i.MX6 SoloX (Device Tree) Workqueue: events disconnect_work [cfg80211] unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x58/0x70 dump_stack_lvl from __warn+0x70/0x1c0 __warn from warn_slowpath_fmt+0x16c/0x294 warn_slowpath_fmt from disconnect_work+0xb8/0x144 [cfg80211] disconnect_work [cfg80211] from process_one_work+0x204/0x620 process_one_work from worker_thread+0x1b0/0x474 worker_thread from kthread+0x10c/0x12c kthread from ret_from_fork+0x14/0x24
Quoted 4 lines
Reported-by [email protected]Cc Johannes Berg <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>
Now queued up, thanks.
greg k-h