crypto: qat - fix double free during reset
authorSvyatoslav Pankratov <svyatoslav.pankratov@intel.com>
Mon, 9 Oct 2023 12:27:19 +0000 (13:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jan 2024 16:16:55 +0000 (17:16 +0100)
commitbcf6fe34a314b5db771533157479647e486ce84f
tree1eed7ca9cdc9a3689c651b586180f23d7f8c635f
parent64170e83ae89655f884ccf83c43490cd684e2c40
crypto: qat - fix double free during reset

[ Upstream commit 01aed663e6c421aeafc9c330bda630976b50a764 ]

There is no need to free the reset_data structure if the recovery is
unsuccessful and the reset is synchronous. The function
adf_dev_aer_schedule_reset() handles the cleanup properly. Only
asynchronous resets require such structure to be freed inside the reset
worker.

Fixes: d8cba25d2c68 ("crypto: qat - Intel(R) QAT driver framework")
Signed-off-by: Svyatoslav Pankratov <svyatoslav.pankratov@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>
drivers/crypto/intel/qat/qat_common/adf_aer.c