From: Herbert Xu <herbert@gondor.apana.org.au>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: ayush.sawal@chelsio.com, davem@davemloft.net,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] crypto: chcr - Free fallback transforms when device assignment fails
Date: Fri, 13 Nov 2026 21:05:36 +0800 [thread overview]
Message-ID: <avcLIImowe7Pw1so@gondor.apana.org.au> (raw)
In-Reply-To: <20261103063850.1033008-1-vulab@iscas.ac.cn>
On Tue, Nov 03, 2026 at 06:38:50AM +0000, Wentao Liang wrote:
> The skcipher, RFC3686 and AEAD initialization callbacks allocate their
> fallback transforms before calling chcr_device_init(). If no active
> device can be assigned, chcr_device_init() returns -ENXIO and the
> fallback is leaked. The crypto core does not invoke the algorithm's
> exit callback after its initialization callback fails.
>
> Free the fallback transform before returning the device assignment
> error in each of these initialization callbacks.
>
> Fixes: b8fd1f4170e7 ("crypto: chcr - Add ctr mode and process large sg entries for cipher")
> Fixes: 0e93708dabc0 ("crypto: chcr - Add fallback for AEAD algos")
> Cc: stable@vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
> ---
> drivers/crypto/chelsio/chcr_algo.c | 21 ++++++++++++++++++---
> 1 file changed, 18 insertions(+), 3 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2026-11-13 13:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 6:38 Wentao Liang
2026-11-03 7:27 ` Krzysztof Kozlowski
2026-11-13 13:05 ` Herbert Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=avcLIImowe7Pw1so@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=ayush.sawal@chelsio.com \
--cc=davem@davemloft.net \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vulab@iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®