]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
crypto: aspeed - Fix dma_unmap_sg() direction
authorThomas Fourier <fourier.thomas@gmail.com>
Wed, 10 Sep 2025 08:22:31 +0000 (10:22 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 20 Sep 2025 12:21:03 +0000 (20:21 +0800)
It seems like everywhere in this file, when the request is not
bidirectionala, req->src is mapped with DMA_TO_DEVICE and req->dst is
mapped with DMA_FROM_DEVICE.

Fixes: 62f58b1637b7 ("crypto: aspeed - add HACE crypto driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/aspeed/aspeed-hace-crypto.c

index a72dfebc53ffc2bc36ae059ec8369d45df58ace3..fa201dae1f81b442036faa80f2f180b72c29e09b 100644 (file)
@@ -346,7 +346,7 @@ free_req:
 
        } else {
                dma_unmap_sg(hace_dev->dev, req->dst, rctx->dst_nents,
-                            DMA_TO_DEVICE);
+                            DMA_FROM_DEVICE);
                dma_unmap_sg(hace_dev->dev, req->src, rctx->src_nents,
                             DMA_TO_DEVICE);
        }