[PATCH v2] ath10k: reset pointer after memory free to avoid potential use-after-free

Kalle Valo kvalo at kernel.org
Thu Sep 22 00:18:12 PDT 2022


Wen Gong <quic_wgong at quicinc.com> wrote:

> When running suspend test, kernel crash happened in ath10k, and it is
> fixed by commit b72a4aff947b ("ath10k: skip ath10k_halt during suspend
> for driver state RESTARTING").
> 
> Currently the crash is fixed, but as a common code style, it is better
> to set the pointer to NULL after memory is free.
> 
> This is to address the code style and it will avoid potential bug of
> use-after-free.
> 
> Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1
> Signed-off-by: Wen Gong <quic_wgong at quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo at quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

1e1cb8e0b73e wifi: ath10k: reset pointer after memory free to avoid potential use-after-free

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220505092248.787-1-quic_wgong@quicinc.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches




More information about the ath11k mailing list