WSL2-Linux-Kernel/drivers/crypto/qat
Hareshx Sankar Raj 6d9f814b26 crypto: qat - unmap buffers before free for RSA
[ Upstream commit d776b25495 ]

The callback function for RSA frees the memory allocated for the source
and destination buffers before unmapping them.
This sequence is wrong.

Change the cleanup sequence to unmap the buffers before freeing them.

Fixes: 3dfaf0071e ("crypto: qat - remove dma_free_coherent() for RSA")
Signed-off-by: Hareshx Sankar Raj <hareshx.sankar.raj@intel.com>
Co-developed-by: Bolemx Sivanagaleela <bolemx.sivanagaleela@intel.com>
Signed-off-by: Bolemx Sivanagaleela <bolemx.sivanagaleela@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-23 13:47:16 +02:00
..
qat_4xxx crypto: qat - re-enable registration of algorithms 2022-07-29 17:25:28 +02:00
qat_c3xxx crypto: qat - remove the unnecessary get_vintmsk_offset() 2021-08-21 15:44:56 +08:00
qat_c3xxxvf crypto: qat - flush vf workqueue at driver removal 2021-08-21 15:44:56 +08:00
qat_c62x crypto: qat - remove the unnecessary get_vintmsk_offset() 2021-08-21 15:44:56 +08:00
qat_c62xvf crypto: qat - flush vf workqueue at driver removal 2021-08-21 15:44:56 +08:00
qat_common crypto: qat - unmap buffers before free for RSA 2023-07-23 13:47:16 +02:00
qat_dh895xcc crypto: qat - set COMPRESSION capability for DH895XCC 2022-06-09 10:23:05 +02:00
qat_dh895xccvf crypto: qat - flush vf workqueue at driver removal 2021-08-21 15:44:56 +08: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