[PATCH] crypto: ixp4xx - Free the fallback cipher if context initialization fails

Herbert Xu herbert at gondor.apana.org.au
Fri Nov 13 05:05:27 PST 2026


On Tue, Nov 03, 2026 at 06:29:42AM +0000, Wentao Liang wrote:
> init_tfm_ablk() allocates a fallback skcipher before calling init_tfm().
> If allocating either security association context fails, init_tfm()
> returns an error and the fallback is left allocated. The crypto core
> does not call the algorithm exit callback after a failed initialization,
> so exit_tfm_ablk() cannot release it.
> 
> Free the fallback cipher when init_tfm() fails. The security association
> contexts are already unwound by init_tfm().
> 
> Fixes: dfb098d692ea ("crypto: ixp4xx - fallback when having more than one SG")
> Cc: stable at vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab at iscas.ac.cn>
> ---
>  drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

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



More information about the linux-arm-kernel mailing list