]> git.ipfire.org Git - thirdparty/linux.git/commit
crypto: atmel-tdes - fix DMA sync direction
authorThorsten Blum <thorsten.blum@linux.dev>
Sat, 7 Mar 2026 15:31:10 +0000 (16:31 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 15 Mar 2026 04:23:13 +0000 (13:23 +0900)
commitc8a9a647532f5c2a04180352693215e24e9dba03
tree69247d6038bdc1820afcc66b0d3cc674e786b43a
parent5377032914b29b4643adece0ff1dfc67e36700f4
crypto: atmel-tdes - fix DMA sync direction

Before DMA output is consumed by the CPU, ->dma_addr_out must be synced
with dma_sync_single_for_cpu() instead of dma_sync_single_for_device().
Using the wrong direction can return stale cache data on non-coherent
platforms.

Fixes: 13802005d8f2 ("crypto: atmel - add Atmel DES/TDES driver")
Fixes: 1f858040c2f7 ("crypto: atmel-tdes - add support for latest release of the IP (0x700)")
Cc: stable@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/atmel-tdes.c