crypto: qat - cancel work on re-enable SR-IOV timeout
Subsystems (2)
Giovanni Cabiddu
maintainerPATCH 1/1 crypto: qat - cancel work on re-enable SR-IOV timeout
The QAT reset worker queues SR-IOV reenable work using a work_struct and completion embedded in an on-stack adf_sriov_dev_data. If the completion wait times out, the reset worker can return while device_sriov_wq still holds or executes the stack-backed work item.
Cancel the work on the device_sriov_wq on timeout before the stack frame unwinds.
--- drivers/crypto/intel/qat/qat_common/adf_aer.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/crypto/intel/qat/qat_common/adf_aer.c +2 -0
@@ -189,6 +189,8 @@ static void adf_device_reset_worker(struct work_struct *work)queue_work (device_sriov_wq, &sriov_data.sriov_work);if (wait_for_completion_timeout (&sriov_data.compl, wait_jiffies))adf_pf2vf_notify_restarted (accel_dev); +else +cancel_work_sync (&sriov_data.sriov_work);adf_dev_restarted_notify (accel_dev);clear_bit (ADF_STATUS_RESTARTING , &accel_dev->status);
base-commit: 36d82ddc0f8a88444e8d65646a3c43147005ed35
Signature · 1 line
2.54.0
Herbert Xu
maintainerQuoted 8 lines · Giovanni Cabiddu
The QAT reset worker queues SR-IOV reenable work using a
work_structand completion embedded in an on-stackadf_sriov_dev_data. If the completion wait times out, the reset worker can return whiledevice_sriov_wqstill holds or executes the stack-backed work item.Cancel the work on the
device_sriov_wqon timeout before the stack frame unwinds.
Quoted 6 lines
Fixes 4469f9b23468 ("crypto: qat - re-enable sriov after pf reset")Signed-off-by Giovanni Cabiddu <[email protected]>Reviewed-by Ahsan Atta <[email protected]>--- drivers/crypto/intel/qat/qat_common/adf_aer.c | 2 ++ 1 file changed, 2 insertions(+)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt