summary refs log tree commit diff
diff options
context:
space:
mode:
authorWen Gong <quic_wgong@quicinc.com>2023-06-07 16:12:32 +0800
committerPierre-Loup A. Griffais <pgriffais@valvesoftware.com>2023-11-02 16:07:52 -0700
commit2273314d8217674cb8e6f75d1d3cdb39c2e9b8a0 (patch)
treeccbb070f36ace85ef852492027e7b01b04522228
parent4a6c51ed030c6eae6f8cb74afaa4385d43f5ee42 (diff)
downloadlinux-2273314d8217674cb8e6f75d1d3cdb39c2e9b8a0.tar.gz
wifi: ath11k: fix a possible dead lock caused by ab->base_lock
-rw-r--r--drivers/net/wireless/ath/ath11k/wmi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 032e660114c0..f25efa08664b 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -7002,13 +7002,13 @@ int ath11k_reg_handle_chan_list(struct ath11k_base *ab,
 	/* Avoid default reg rule updates sent during FW recovery if
 	 * it is already available
 	 */
-	spin_lock(&ab->base_lock);
+	spin_lock_bh(&ab->base_lock);
 	if (test_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags) &&
 	    ab->default_regd[pdev_idx]) {
-		spin_unlock(&ab->base_lock);
+		spin_unlock_bh(&ab->base_lock);
 		goto retfail;
 	}
-	spin_unlock(&ab->base_lock);
+	spin_unlock_bh(&ab->base_lock);
 
 	if (pdev_idx >= ab->num_radios) {
 		/* Process the event for phy0 only if single_pdev_only
@@ -7058,7 +7058,7 @@ int ath11k_reg_handle_chan_list(struct ath11k_base *ab,
 		ab->reg_info_store[pdev_idx] = *reg_info;
 	}
 
-	spin_lock(&ab->base_lock);
+	spin_lock_bh(&ab->base_lock);
 	if (ab->default_regd[pdev_idx]) {
 		/* The initial rules from FW after WMI Init is to build
 		 * the default regd. From then on, any rules updated for
@@ -7078,7 +7078,7 @@ int ath11k_reg_handle_chan_list(struct ath11k_base *ab,
 		ab->default_regd[pdev_idx] = regd;
 	}
 	ab->dfs_region = reg_info->dfs_region;
-	spin_unlock(&ab->base_lock);
+	spin_unlock_bh(&ab->base_lock);
 
 	return 0;