Skip to content

Commit 42a28f0

Browse files
committed
crypto: qat - Fix missing destroy_workqueue in adf_init_aer()
JIRA: https://issues.redhat.com/browse/RHEL-23197 Upstream Status: merged into the linux.git commit d8920a7 Author: Wang Hai <wanghai38@huawei.com> Date: Tue Oct 29 23:05:23 2024 +0800 crypto: qat - Fix missing destroy_workqueue in adf_init_aer() The adf_init_aer() won't destroy device_reset_wq when alloc_workqueue() for device_sriov_wq failed. Add destroy_workqueue for device_reset_wq to fix this issue. Fixes: 4469f9b ("crypto: qat - re-enable sriov after pf reset") Signed-off-by: Wang Hai <wanghai38@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Vladis Dronov <vdronov@redhat.com>
1 parent 67494f5 commit 42a28f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/crypto/intel/qat/qat_common/adf_aer.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,11 @@ int adf_init_aer(void)
281281
return -EFAULT;
282282

283283
device_sriov_wq = alloc_workqueue("qat_device_sriov_wq", 0, 0);
284-
if (!device_sriov_wq)
284+
if (!device_sriov_wq) {
285+
destroy_workqueue(device_reset_wq);
286+
device_reset_wq = NULL;
285287
return -EFAULT;
288+
}
286289

287290
return 0;
288291
}

0 commit comments

Comments
 (0)