From: Greg Kroah-Hartman Date: Fri, 27 Sep 2024 07:54:21 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v6.1.112~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f24b1f615c662fa6fe9f5afd8bb620fdadcb299;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: revert-wifi-cfg80211-check-wiphy-mutex-is-held-for-wdev-mutex.patch --- diff --git a/queue-5.4/revert-wifi-cfg80211-check-wiphy-mutex-is-held-for-wdev-mutex.patch b/queue-5.4/revert-wifi-cfg80211-check-wiphy-mutex-is-held-for-wdev-mutex.patch new file mode 100644 index 00000000000..dbbf5d28f98 --- /dev/null +++ b/queue-5.4/revert-wifi-cfg80211-check-wiphy-mutex-is-held-for-wdev-mutex.patch @@ -0,0 +1,71 @@ +From pkshih@realtek.com Fri Sep 27 09:45:55 2024 +From: Ping-Ke Shih +Date: Thu, 26 Sep 2024 08:30:17 +0800 +Subject: [PATCH stable 6.6] Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex" +To: +Cc: , +Message-ID: <20240926003017.5427-1-pkshih@realtek.com> + +From: 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 + +Reported-by: petter@technux.se +Closes: https://lore.kernel.org/linux-wireless/9e98937d781c990615ef27ee0c858ff9@technux.se/T/#t +Cc: Johannes Berg +Signed-off-by: Ping-Ke Shih +Signed-off-by: Greg Kroah-Hartman +--- + 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 + diff --git a/queue-5.4/series b/queue-5.4/series index c284f4b88a7..18102ba3cbe 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -24,3 +24,4 @@ spi-bcm63xx-enable-module-autoloading.patch x86-hyperv-set-x86_feature_tsc_known_freq-when-hyper.patch ocfs2-add-bounds-checking-to-ocfs2_xattr_find_entry.patch ocfs2-strict-bound-check-before-memcmp-in-ocfs2_xatt.patch +revert-wifi-cfg80211-check-wiphy-mutex-is-held-for-wdev-mutex.patch