[PATCH] crypto: atmel-tdes - zero-initialize device state

Herbert Xu herbert at gondor.apana.org.au
Thu Sep 10 22:30:22 PDT 2026


On Sat, Aug 29, 2026 at 05:58:21AM +0200, Karl Mehltretter wrote:
> Commit c659d07f11a3 ("crypto: atmel-tdes - Switch to managed version of
> kzalloc") accidentally replaced kzalloc() with devm_kmalloc(), so the
> device state is no longer zeroed.
> 
> atmel_tdes_hw_init() tests dd->flags during probe: a stale TDES_FLAGS_INIT
> skips the hardware reset, and a stale TDES_FLAGS_BUSY makes
> atmel_tdes_handle_queue() treat the engine as permanently busy, leaving
> every request queued and never dispatched.
> 
> Seen on a SAM9X75 Curiosity: the first TDES request after boot never
> completes and the TDES interrupt count stays at zero, while the AES and
> SHA engines on the same SoC work normally.
> 
> Switch to devm_kzalloc(), matching the Atmel AES and SHA drivers.
> 
> Fixes: c659d07f11a3 ("crypto: atmel-tdes - Switch to managed version of kzalloc")
> Cc: stable at vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Karl Mehltretter <kmehltretter at gmail.com>
> ---
>  drivers/crypto/atmel-tdes.c | 2 +-
>  1 file changed, 1 insertion(+), 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