diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2013-11-08 11:01:32 +0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-11-12 22:06:46 +0400 |
commit | 2415fc16391af204170f5478072fb1a2c66b87f3 (patch) | |
tree | 123a57723661920c8bb800176f6000f2a19a29d5 /drivers/net/wireless/ath/ath10k/htc.c | |
parent | 28642f428100fa602d08714d0005b6a5a4e47e9b (diff) | |
download | linux-2415fc16391af204170f5478072fb1a2c66b87f3.tar.xz |
ath10k: guard against CE corruption from firmware
In case firmware crashes it may report CE
completions for entries that were never
submitted/filled with meaningful data. This in
turn led to NULL dereferences.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/htc.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/htc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index 3118d7506734..6d7a72eb11a5 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c @@ -191,6 +191,11 @@ static int ath10k_htc_tx_completion_handler(struct ath10k *ar, struct ath10k_htc *htc = &ar->htc; struct ath10k_htc_ep *ep = &htc->endpoint[eid]; + if (!skb) { + ath10k_warn("invalid sk_buff completion - NULL pointer. firmware crashed?\n"); + return 0; + } + ath10k_htc_notify_tx_completion(ep, skb); /* the skb now belongs to the completion handler */ |