linux/drivers/crypto/hisilicon
Chenghai Huang 7226a0650a crypto: hisilicon/qm - set NULL to qm->debug.qm_diff_regs
[ Upstream commit f0cafb02de ]

When the initialization of qm->debug.acc_diff_reg fails,
the probe process does not exit. However, after qm->debug.qm_diff_regs is
freed, it is not set to NULL. This can lead to a double free when the
remove process attempts to free it again. Therefore, qm->debug.qm_diff_regs
should be set to NULL after it is freed.

Fixes: 8be0913389 ("crypto: hisilicon/debugfs - Fix debugfs uninit process issue")
Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-10-15 12:04:04 +02:00
..
hpre crypto: hisilicon - check the sva module status while enabling or disabling address prefetch 2025-10-15 12:03:49 +02:00
sec crypto: drivers - Switch back to struct platform_driver::remove() 2024-10-19 08:44:30 +08:00
sec2 crypto: hisilicon - check the sva module status while enabling or disabling address prefetch 2025-10-15 12:03:49 +02:00
trng crypto: drivers - Switch back to struct platform_driver::remove() 2024-10-19 08:44:30 +08:00
zip crypto: hisilicon - check the sva module status while enabling or disabling address prefetch 2025-10-15 12:03:49 +02:00
debugfs.c crypto: hisilicon/qm - set NULL to qm->debug.qm_diff_regs 2025-10-15 12:04:04 +02:00
Kconfig hwrng: histb - Move driver to drivers/char/hw_random/histb-rng.c 2023-05-12 18:48:01 +08:00
Makefile hwrng: histb - Move driver to drivers/char/hw_random/histb-rng.c 2023-05-12 18:48:01 +08:00
qm.c crypto: hisilicon/qm - request reserved interrupt for virtual function 2025-10-15 12:03:50 +02:00
qm_common.h crypto: hisilicon/qm - simplify the status of qm 2023-12-01 18:03:26 +08:00
sgl.c crypto: hisilicon - Use fine grained DMA mapping direction 2025-06-23 17:00:27 +08:00