Message ID | 1532969029-12926-1-git-send-email-greearb@candelatech.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ath10k: Protect against buggy firmware. | expand |
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 478cc67..8ab949d 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -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; }