Re: [PATCH] crypto: octeontx2 - Unwind allocations when AEAD initialization fails
From: Krzysztof Kozlowski
Date: Tue Nov 03 2026 - 02:10:46 EST
On 03/11/2026 07:42, Wentao Liang wrote:
> cpt_aead_init() allocates a hash transform, descriptor and pads before
> looking up a CPT device and initializing the hardware context. Failures
> in those later steps return without freeing the earlier allocations.
> If fallback allocation fails, the hardware context is also left mapped
> and allocated. The algorithm exit callback does not run after a failed
> initialization.
>
> Release the hardware context when fallback initialization fails and free
> the hash resources on all three failure paths.
>
> Fixes: 6f03f0e8b6c8 ("crypto: octeontx2 - register with linux crypto framework")
> Fixes: e92971117c2c ("crypto: octeontx2 - add ctx_val workaround")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
Another fake identity of "vulab" doing exactly the same as other cases,
repeating same mistake of running unsupervised crappy bot even though
was asked multiple times to fix that.
Best regards,
Krzysztof