From: Greg Kroah-Hartman Date: Wed, 23 Apr 2025 14:17:05 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v6.1.135~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=187ec00d0b976a5adb852e69bfe5e309ca9f6a3c;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: drivers-staging-rtl8723bs-fix-locking-in-rtw_scan_timeout_handler.patch --- 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 index 0000000000..27d906bf36 --- /dev/null +++ b/queue-5.10/drivers-staging-rtl8723bs-fix-locking-in-rtw_scan_timeout_handler.patch @@ -0,0 +1,46 @@ +From 3f467036093fedd7e231924327455fc609b5ef02 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Tue, 21 Feb 2023 15:53:24 +0100 +Subject: drivers: staging: rtl8723bs: Fix locking in rtw_scan_timeout_handler() + +From: Hans de Goede + +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 +Signed-off-by: Hans de Goede +Link: https://lore.kernel.org/r/20230221145326.7808-2-hdegoede@redhat.com +Signed-off-by: Greg Kroah-Hartman +--- + 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); + } diff --git a/queue-5.10/series b/queue-5.10/series index 72887c2d3e..ccc4b0a0e4 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -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