Skip to content

Commit 53dc61a

Browse files
Ping-Ke Shihgregkh
authored andcommitted
Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex"
This reverts commit 268f84a which is commmit 1474bc8 upstream. 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 Reported-by: [email protected] Closes: https://lore.kernel.org/linux-wireless/[email protected]/T/#t Cc: Johannes Berg <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 424bd79 commit 53dc61a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

net/wireless/core.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,24 +228,18 @@ void cfg80211_register_wdev(struct cfg80211_registered_device *rdev,
228228
static inline void wdev_lock(struct wireless_dev *wdev)
229229
__acquires(wdev)
230230
{
231-
lockdep_assert_held(&wdev->wiphy->mtx);
232231
mutex_lock(&wdev->mtx);
233232
__acquire(wdev->mtx);
234233
}
235234

236235
static inline void wdev_unlock(struct wireless_dev *wdev)
237236
__releases(wdev)
238237
{
239-
lockdep_assert_held(&wdev->wiphy->mtx);
240238
__release(wdev->mtx);
241239
mutex_unlock(&wdev->mtx);
242240
}
243241

244-
static inline void ASSERT_WDEV_LOCK(struct wireless_dev *wdev)
245-
{
246-
lockdep_assert_held(&wdev->wiphy->mtx);
247-
lockdep_assert_held(&wdev->mtx);
248-
}
242+
#define ASSERT_WDEV_LOCK(wdev) lockdep_assert_held(&(wdev)->mtx)
249243

250244
static inline bool cfg80211_has_monitors_only(struct cfg80211_registered_device *rdev)
251245
{

0 commit comments

Comments
 (0)