Patch "drivers: staging: rtl8723bs: Fix locking in rtw_scan_timeout_handler()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drivers: staging: rtl8723bs: Fix locking in rtw_scan_timeout_handler()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drivers-staging-rtl8723bs-fix-locking-in-rtw_scan_ti.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6225da53a7bef29c11511edeeb9bbac070fc1062
Author: Hans de Goede <hdegoede@xxxxxxxxxx>
Date:   Tue Feb 21 15:53:24 2023 +0100

    drivers: staging: rtl8723bs: Fix locking in rtw_scan_timeout_handler()
    
    [ Upstream commit 3f467036093fedd7e231924327455fc609b5ef02 ]
    
    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@xxxxxxxxxx>
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230221145326.7808-2-hdegoede@xxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index f85ef7dd61b24..5b64980e8522f 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1588,11 +1588,11 @@ void rtw_scan_timeout_handler(struct timer_list *t)
 						  mlmepriv.scan_to_timer);
 	struct	mlme_priv *pmlmepriv = &adapter->mlmepriv;
 
-	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);
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux