mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 11:55:03 +07:00
fe9b47944e
If "txq->cmd = kzalloc(...)" in il_tx_queue_init fails, "kfree(txq->cmd[i])" in il_tx_queue_free and il_cmd_queue_free in iwl4965_hw_txq_ctx_free will causes a null pointer dereference, because txq->cmd is NULL at that time. This patch fixes this problem by adding a if-check before kfree. To avoid double free in il_tx_queue_free and il_cmd_queue_free caused by the fixing, txq->meta and txq->cmd in error handling code of il_tx_queue_init are assigned null values. Otherwise, a double free will occur. This patch has been tested in real device, and it actually fixes the bug. Thanks Stanislaw for his suggestion. Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> |
||
---|---|---|
.. | ||
3945-debug.c | ||
3945-mac.c | ||
3945-rs.c | ||
3945.c | ||
3945.h | ||
4965-calib.c | ||
4965-debug.c | ||
4965-mac.c | ||
4965-rs.c | ||
4965.c | ||
4965.h | ||
commands.h | ||
common.c | ||
common.h | ||
csr.h | ||
debug.c | ||
iwl-spectrum.h | ||
Kconfig | ||
Makefile | ||
prph.h |