Skip to contentSkip to conversation

ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock

PATCH In review Shuah Khan 2 participants 3 messages Apr 6, 2021 – Apr 22, 2021

Subsystems (3)
lore
Share & tools
lore

Shuah Khan

author
#0 lore raw

PATCH 1/1 ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock

ath10k_wmi_tlv_op_pull_peer_stats_info() could try to unlock RCU lock winthout locking it first when peer reason doesn't match the valid cases for this function.

Add a default case to return without unlocking.

Fixes 09078368d516 ("ath10k: hold RCU lock when calling ieee80211_find_sta_by_ifaddr()")
---
 drivers/net/wireless/ath/ath10k/wmi-tlv.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/ath/ath10k/wmi-tlv.c +3 -0
index d97b33f789e4..7efbe03fbca8 100644
@@ -592,6 +592,9 @@ static void ath10k_wmi_event_tdls_peer(struct ath10k *ar, struct sk_buff *skb)
 					GFP_ATOMIC
 					);
 		break;
+	default:
+		kfree(tb);
+		return;
 	}
 
 exit:
Signature · 1 line
2.27.0
#1 lore raw
Quoted 10 lines · Shuah Khan

ath10k_wmi_tlv_op_pull_peer_stats_info() could try to unlock RCU lock winthout locking it first when peer reason doesn't match the valid cases for this function.

Add a default case to return without unlocking.

Fixes 09078368d516 ("ath10k: hold RCU lock when calling ieee80211_find_sta_by_ifaddr()")

Patch applied to ath-next branch of ath.git, thanks.

eaaf52e4b866 ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#2 lore raw
In reply to Shuah Khan
Quoted 10 lines · Shuah Khan

ath10k_wmi_tlv_op_pull_peer_stats_info() could try to unlock RCU lock winthout locking it first when peer reason doesn't match the valid cases for this function.

Add a default case to return without unlocking.

Fixes 09078368d516 ("ath10k: hold RCU lock when calling ieee80211_find_sta_by_ifaddr()")

Patch applied to ath-next branch of ath.git, thanks.

eaaf52e4b866 ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock

Signature · 9 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k