提交 2ab03a6b 编写于 作者: M Michal Kazior 提交者: Kalle Valo

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: NMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 ec6bc552
...@@ -1431,6 +1431,7 @@ static void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb) ...@@ -1431,6 +1431,7 @@ static void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb)
ATH10K_SKB_CB(arvif->beacon)->paddr, ATH10K_SKB_CB(arvif->beacon)->paddr,
arvif->beacon->len, DMA_TO_DEVICE); arvif->beacon->len, DMA_TO_DEVICE);
dev_kfree_skb_any(arvif->beacon); dev_kfree_skb_any(arvif->beacon);
arvif->beacon = NULL;
} }
ATH10K_SKB_CB(bcn)->paddr = dma_map_single(arvif->ar->dev, ATH10K_SKB_CB(bcn)->paddr = dma_map_single(arvif->ar->dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册