linux/drivers/net/wireless/intel
Lv Yunlong f973795a8d wireless: iwlwifi: Fix a double free in iwl_txq_dyn_alloc_dma
In iwl_txq_dyn_alloc_dma, txq->tfds is freed at first time by:
iwl_txq_alloc()->goto err_free_tfds->dma_free_coherent(). But
it forgot to set txq->tfds to NULL.

Then the txq->tfds is freed again in iwl_txq_dyn_alloc_dma by:
goto error->iwl_txq_gen2_free_memory()->dma_free_coherent().

My patch sets txq->tfds to NULL after the first free to avoid the
double free.

Fixes: 0cd1ad2d7f ("iwlwifi: move all bus-independent TX functions to common code")
Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Link: https://lore.kernel.org/r/20210403054755.4781-1-lyl2019@mail.ustc.edu.cn
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-12-07 13:10:10 +02:00
..
ipw2x00 ipw2200: prepare for const netdev->dev_addr 2021-10-20 12:39:45 +03:00
iwlegacy Core: 2021-11-02 06:20:58 -07:00
iwlwifi wireless: iwlwifi: Fix a double free in iwl_txq_dyn_alloc_dma 2021-12-07 13:10:10 +02:00
Kconfig
Makefile