Skip to contentSkip to conversation

ath10k: Protect against buggy firmware.

PATCH New [email protected] 1 participant 1 message Jul 30, 2018 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: Protect against buggy firmware.

From: Ben Greear <[email protected]>

While testing some buggy wave-2 firmware, I was seeing full kernel crashes. Adding this additional check keeps the kernel from crashing.

---
 drivers/net/wireless/ath/ath10k/htt_rx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/htt_rx.c +3 -3
index 478cc67..8ab949d 100644
@@ -2644,9 +2644,9 @@ static void ath10k_htt_fetch_peer_stats(struct ath10k *ar,
 	rcu_read_lock();
 	spin_lock_bh(&ar->data_lock);
 	peer = ath10k_peer_find_by_id(ar, peer_id);
-	if (!peer) {
-		ath10k_warn(ar, "Invalid peer id %d peer stats buffer\n",
-			    peer_id);
+	if (!peer || !peer->sta) {
+		ath10k_warn(ar, "Invalid peer id %d or peer stats buffer, peer: %p  sta: %p\n",
+			    peer_id, peer, peer ? peer->sta : NULL);
 		goto out;
 	}
 
Signature · 7 lines
2.4.11


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