Re: [PATCH] crypto: chcr - Balance inflight count on invalid RFC4106 AAD length

From: Herbert Xu

Date: Fri Nov 13 2026 - 09:32:20 EST


On Tue, Nov 03, 2026 at 07:52:55AM +0000, Wentao Liang wrote:
> chcr_aead_op() increments the device inflight counter before checking
> the RFC4106 associated data length. If the length is invalid, it returns
> -EINVAL without submitting a request or decrementing the counter. No
> completion can balance that increment, so device teardown keeps seeing
> an outstanding request.
>
> Decrement the counter before returning from this validation failure,
> matching the other synchronous error exits after chcr_inc_wrcount().
>
> Fixes: d91a3159e8d9 ("Crypto/chcr: fix gcm-aes and rfc4106-gcm failed tests")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
> ---
> drivers/crypto/chelsio/chcr_algo.c | 1 +
> 1 file changed, 1 insertion(+)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt