aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAhsan Atta <ahsan.atta@intel.com>2026-05-20 13:33:00 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2026-05-29 14:05:29 +0800
commit7d3ed20f7e46b3e991936fedd7a28f3ff4aec8d2 (patch)
tree67be35a1ec09d4d64264bdcd7f910659de9402b0 /include
parenta43b47340b6bf809f282db8639fc4deea0180208 (diff)
crypto: qat - fix restarting state leak on allocation failure
In adf_dev_aer_schedule_reset(), ADF_STATUS_RESTARTING is set before allocating reset_data. If the allocation fails, the function returns -ENOMEM without queuing reset work, so nothing ever clears the bit. This leaves the device permanently stuck in the restarting state, causing all subsequent reset attempts to be silently skipped. Fix this by using test_and_set_bit() to atomically claim the RESTARTING state, preventing duplicate reset scheduling races under concurrent fatal error reporting. If the subsequent allocation fails, clear the bit to restore clean state so future reset attempts can proceed. Cc: stable@vger.kernel.org Fixes: d8cba25d2c68 ("crypto: qat - Intel(R) QAT driver framework") Signed-off-by: Ahsan Atta <ahsan.atta@intel.com> Co-developed-by: Maksim Lukoshkov <maksim.lukoshkov@intel.com> Signed-off-by: Maksim Lukoshkov <maksim.lukoshkov@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions