]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Apr 2025 14:17:05 +0000 (16:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Apr 2025 14:17:05 +0000 (16:17 +0200)
added patches:
drivers-staging-rtl8723bs-fix-locking-in-rtw_scan_timeout_handler.patch

queue-5.10/drivers-staging-rtl8723bs-fix-locking-in-rtw_scan_timeout_handler.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/drivers-staging-rtl8723bs-fix-locking-in-rtw_scan_timeout_handler.patch b/queue-5.10/drivers-staging-rtl8723bs-fix-locking-in-rtw_scan_timeout_handler.patch
new file mode 100644 (file)
index 0000000..27d906b
--- /dev/null
@@ -0,0 +1,46 @@
+From 3f467036093fedd7e231924327455fc609b5ef02 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Tue, 21 Feb 2023 15:53:24 +0100
+Subject: drivers: staging: rtl8723bs: Fix locking in rtw_scan_timeout_handler()
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit 3f467036093fedd7e231924327455fc609b5ef02 upstream.
+
+Commit cc7ad0d77b51 ("drivers: staging: rtl8723bs: Fix deadlock in
+rtw_surveydone_event_callback()") besides fixing the deadlock also
+modified rtw_scan_timeout_handler() to use spin_[un]lock_irq()
+instead of spin_[un]lock_bh().
+
+Disabling the IRQs is not necessary since all code taking this lock
+runs from either user contexts or from softirqs
+
+rtw_scan_timeout_handler() is the only function taking pmlmepriv->lock
+which uses spin_[un]lock_irq() for this. Switch back to
+spin_[un]lock_bh() to make it consistent with the rest of the code.
+
+Fixes: cc7ad0d77b51 ("drivers: staging: rtl8723bs: Fix deadlock in rtw_surveydone_event_callback()")
+Cc: Duoming Zhou <duoming@zju.edu.cn>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Link: https://lore.kernel.org/r/20230221145326.7808-2-hdegoede@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/staging/rtl8723bs/core/rtw_mlme.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
++++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
+@@ -1755,11 +1755,11 @@ void rtw_scan_timeout_handler(struct tim
+       DBG_871X(FUNC_ADPT_FMT" fw_state =%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv));
+-      spin_lock_irq(&pmlmepriv->lock);
++      spin_lock_bh(&pmlmepriv->lock);
+       _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
+-      spin_unlock_irq(&pmlmepriv->lock);
++      spin_unlock_bh(&pmlmepriv->lock);
+       rtw_indicate_scan_done(adapter, true);
+ }
index 72887c2d3eee0975101bf7ce67194954c779f074..ccc4b0a0e4cb344c529e683cbea04f9816f5dc7e 100644 (file)
@@ -185,8 +185,8 @@ kernel-resource-fix-kfree-of-bootmem-memory-again.patch
 drm-i915-gt-cleanup-partial-engine-discovery-failures.patch
 fs-proc-do_task_stat-use-sig-stats_lock-to-gather-the-threads-children-stats.patch
 mm-fix-apply_to_existing_page_range.patch
-perf-fix-perf_pending_task-uaf.patch
 drivers-staging-rtl8723bs-fix-deadlock-in-rtw_surveydone_event_callback.patch
 s390-dasd-fix-double-module-refcount-decrement.patch
 pmdomain-ti-add-a-null-pointer-check-to-the-omap_prm_domain_init.patch
 net-sched-act_mirred-don-t-override-retval-if-we-already-lost-the-skb.patch
+drivers-staging-rtl8723bs-fix-locking-in-rtw_scan_timeout_handler.patch