Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e993f744 authored by Lv Yunlong's avatar Lv Yunlong Committed by Greg Kroah-Hartman
Browse files

mwl8k: Fix a double Free in mwl8k_probe_hw



[ Upstream commit a8e083ee8e2a6c94c29733835adae8bf5b832748 ]

In mwl8k_probe_hw, hw->priv->txq is freed at the first time by
dma_free_coherent() in the call chain:
if(!priv->ap_fw)->mwl8k_init_txqs(hw)->mwl8k_txq_init(hw, i).

Then in err_free_queues of mwl8k_probe_hw, hw->priv->txq is freed
at the second time by mwl8k_txq_deinit(hw, i)->dma_free_coherent().

My patch set txq->txd to NULL after the first free to avoid the
double free.

Fixes: a66098da ("mwl8k: Marvell TOPDOG wireless driver")
Signed-off-by: default avatarLv Yunlong <lyl2019@mail.ustc.edu.cn>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210402182627.4256-1-lyl2019@mail.ustc.edu.cn


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 892d74eb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment