OpenCloudOS-Kernel/drivers/crypto/qat
Lv Yunlong f7cae626ca crypto: qat - Fix a double free in adf_create_ring
In adf_create_ring, if the callee adf_init_ring() failed, the callee will
free the ring->base_addr by dma_free_coherent() and return -EFAULT. Then
adf_create_ring will goto err and the ring->base_addr will be freed again
in adf_cleanup_ring().

My patch sets ring->base_addr to NULL after the first freed to avoid the
double free.

Fixes: a672a9dc87 ("crypto: qat - Intel(R) QAT transport code")
Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-04-09 17:45:14 +10:00
..
qat_4xxx crypto: qat - configure arbiter mapping based on engines enabled 2021-01-14 17:10:26 +11:00
qat_c3xxx crypto: qat - configure arbiter mapping based on engines enabled 2021-01-14 17:10:26 +11:00
qat_c3xxxvf crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init 2021-03-26 20:02:36 +11:00
qat_c62x crypto: qat - configure arbiter mapping based on engines enabled 2021-01-14 17:10:26 +11:00
qat_c62xvf crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init 2021-03-26 20:02:36 +11:00
qat_common crypto: qat - Fix a double free in adf_create_ring 2021-04-09 17:45:14 +10:00
qat_dh895xcc crypto: qat - configure arbiter mapping based on engines enabled 2021-01-14 17:10:26 +11:00
qat_dh895xccvf crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init 2021-03-26 20:02:36 +11:00
Kconfig crypto: qat - replace CRYPTO_AES with CRYPTO_LIB_AES in Kconfig 2021-01-14 17:10:25 +11:00
Makefile crypto: qat - add qat_4xxx driver 2020-11-20 14:45:34 +11:00