linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH stable 6.6] Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex"
@ 2024-09-26  0:30 Ping-Ke Shih
  2024-09-26 13:22 ` Fedor Pchelkin
  2024-09-27  7:49 ` Greg KH
  0 siblings, 2 replies; 5+ messages in thread
From: Ping-Ke Shih @ 2024-09-26  0:30 UTC (permalink / raw)
  To: stable; +Cc: linux-wireless, johannes

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

Reported-by: petter@technux.se
Closes: https://lore.kernel.org/linux-wireless/9e98937d781c990615ef27ee0c858ff9@technux.se/T/#t
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 net/wireless/core.h | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/net/wireless/core.h b/net/wireless/core.h
index c955be6c6daa..f0a3a2317638 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -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)
 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH stable 6.6] Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex"
@ 2024-09-26 12:32 Fedor Pchelkin
  2024-09-26 12:55 ` Fedor Pchelkin
  0 siblings, 1 reply; 5+ messages in thread
From: Fedor Pchelkin @ 2024-09-26 12:32 UTC (permalink / raw)
  To: Ping-Ke Shih, stable
  Cc: linux-wireless, johannes, Greg Kroah-Hartman, Sasha Levin

The patch was also backported to 5.15 and 6.1 stables where it's causing
the same splats.
https://lore.kernel.org/stable/20240918-d150ee61d40b8f327d65bbf3-pchelkin@ispras.ru/

Need to revert it there, too. Should I send the explicit reverts to the
mailing list?

--
Thank you,
Fedor

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH stable 6.6] Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex"
  2024-09-26 12:32 Fedor Pchelkin
@ 2024-09-26 12:55 ` Fedor Pchelkin
  0 siblings, 0 replies; 5+ messages in thread
From: Fedor Pchelkin @ 2024-09-26 12:55 UTC (permalink / raw)
  To: Ping-Ke Shih, stable
  Cc: linux-wireless, johannes, Greg Kroah-Hartman, Sasha Levin

On Thu, 26. Sep 15:32, Fedor Pchelkin wrote:
> The patch was also backported to 5.15 and 6.1 stables where it's causing
> the same splats.
> https://lore.kernel.org/stable/20240918-d150ee61d40b8f327d65bbf3-pchelkin@ispras.ru/
> 
> Need to revert it there, too. Should I send the explicit reverts to the
> mailing list?

And I missed the In-Reply-To tag so that the context is missed, sorry..
Please ignore this one.

I'll send the reply to the suitable mail-thread and will prepare the
explicit reverts.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH stable 6.6] Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex"
  2024-09-26  0:30 [PATCH stable 6.6] Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex" Ping-Ke Shih
@ 2024-09-26 13:22 ` Fedor Pchelkin
  2024-09-27  7:49 ` Greg KH
  1 sibling, 0 replies; 5+ messages in thread
From: Fedor Pchelkin @ 2024-09-26 13:22 UTC (permalink / raw)
  To: stable, Ping-Ke Shih
  Cc: Johannes Berg, Greg Kroah-Hartman, Sasha Levin, linux-wireless

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/20240918-d150ee61d40b8f327d65bbf3-pchelkin@ispras.ru/

I've sent the reverts for those branches, too:
- 5.15 https://lore.kernel.org/stable/20240926131552.34898-1-pchelkin@ispras.ru/
- 6.1  https://lore.kernel.org/stable/20240926131437.34326-1-pchelkin@ispras.ru/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH stable 6.6] Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex"
  2024-09-26  0:30 [PATCH stable 6.6] Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex" Ping-Ke Shih
  2024-09-26 13:22 ` Fedor Pchelkin
@ 2024-09-27  7:49 ` Greg KH
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2024-09-27  7:49 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: stable, linux-wireless, johannes

On Thu, Sep 26, 2024 at 08:30:17AM +0800, Ping-Ke Shih wrote:
> 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
> 
> Reported-by: petter@technux.se
> Closes: https://lore.kernel.org/linux-wireless/9e98937d781c990615ef27ee0c858ff9@technux.se/T/#t
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>

Now queued up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-27  7:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26  0:30 [PATCH stable 6.6] Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex" Ping-Ke Shih
2024-09-26 13:22 ` Fedor Pchelkin
2024-09-27  7:49 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2024-09-26 12:32 Fedor Pchelkin
2024-09-26 12:55 ` Fedor Pchelkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).