summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-04-23 19:30:05 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2014-04-24 09:22:41 +0300
commit2ab03a6b962eb9ff34846156b324eb411837b331 (patch)
tree0465ea3c8005f2dc45e54e5ab82d4277470d1b42 /drivers
parentec6bc5523b40008448bad5eadcdcf4cdbf9c7054 (diff)
downloadlinux-stable-2ab03a6b962eb9ff34846156b324eb411837b331.tar.gz
linux-stable-2ab03a6b962eb9ff34846156b324eb411837b331.tar.bz2
linux-stable-2ab03a6b962eb9ff34846156b324eb411837b331.zip
ath10k: make sure to not use invalid beacon pointer
If DMA mapping of next beacon failed it was possible for next SWBA to access a pointer that was already unmapped and freed. This could cause memory corruption. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index fe4d5f1c672f..11176cc6a2ad 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1431,6 +1431,7 @@ static void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb)
ATH10K_SKB_CB(arvif->beacon)->paddr,
arvif->beacon->len, DMA_TO_DEVICE);
dev_kfree_skb_any(arvif->beacon);
+ arvif->beacon = NULL;
}
ATH10K_SKB_CB(bcn)->paddr = dma_map_single(arvif->ar->dev,