Patch "staging: ks7010: disable bh on tx_dev_lock" has been added to the 4.19-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

    staging: ks7010: disable bh on tx_dev_lock

to the 4.19-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:
     staging-ks7010-disable-bh-on-tx_dev_lock.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 181a9f2ecab0f3b6f0d682a1bc456387e98c68be
Author: Chengfeng Ye <dg573847474@xxxxxxxxx>
Date:   Tue Sep 26 16:13:23 2023 +0000

    staging: ks7010: disable bh on tx_dev_lock
    
    [ Upstream commit 058cbee52ccd7be77e373d31a4f14670cfd32018 ]
    
    As &priv->tx_dev.tx_dev_lock is also acquired by xmit callback which
    could be call from timer under softirq context, use spin_lock_bh()
    on it to prevent potential deadlock.
    
    hostif_sme_work()
    --> hostif_sme_set_pmksa()
    --> hostif_mib_set_request()
    --> ks_wlan_hw_tx()
    --> spin_lock(&priv->tx_dev.tx_dev_lock)
    
    ks_wlan_start_xmit()
    --> hostif_data_request()
    --> ks_wlan_hw_tx()
    --> spin_lock(&priv->tx_dev.tx_dev_lock)
    
    Signed-off-by: Chengfeng Ye <dg573847474@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20230926161323.41928-1-dg573847474@xxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 79d0513bd2828..85c4e27f571b1 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -395,9 +395,9 @@ int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p, unsigned long size,
 	priv->hostt.buff[priv->hostt.qtail] = le16_to_cpu(hdr->event);
 	priv->hostt.qtail = (priv->hostt.qtail + 1) % SME_EVENT_BUFF_SIZE;
 
-	spin_lock(&priv->tx_dev.tx_dev_lock);
+	spin_lock_bh(&priv->tx_dev.tx_dev_lock);
 	result = enqueue_txdev(priv, p, size, complete_handler, skb);
-	spin_unlock(&priv->tx_dev.tx_dev_lock);
+	spin_unlock_bh(&priv->tx_dev.tx_dev_lock);
 
 	if (txq_has_space(priv))
 		queue_delayed_work(priv->wq, &priv->rw_dwork, 0);




[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