mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-04 04:04:19 +00:00
staging: ks7010: disable bh on tx_dev_lock
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@gmail.com> Link: https://lore.kernel.org/r/20230926161323.41928-1-dg573847474@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
eb507641d0
commit
058cbee52c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user