diff options
| author | Thomas Fourier <fourier.thomas@gmail.com> | 2026-03-30 18:19:32 +0300 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2026-04-12 11:46:29 +0300 |
| commit | 1ee57ab93b75eb59f426aef37b5498a7ffc28278 (patch) | |
| tree | 28a94541ea29c9e882375d730096683034221831 | |
| parent | a1b80018b8cec27fc06a8b04a7f8b5f6cfe86eae (diff) | |
| download | linux-1ee57ab93b75eb59f426aef37b5498a7ffc28278.tar.xz | |
crypto: hisilicon - Fix dma_unmap_single() direction
The direction used to map the buffer skreq->iv is DMA_TO_DEVICE but it is
unmapped with direction DMA_BIDIRECTIONAL in the error path.
Change the unmap to match the mapping.
Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
| -rw-r--r-- | drivers/crypto/hisilicon/sec/sec_algs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/hisilicon/sec/sec_algs.c b/drivers/crypto/hisilicon/sec/sec_algs.c index 54e24fd7b9be..85eecbb40e7e 100644 --- a/drivers/crypto/hisilicon/sec/sec_algs.c +++ b/drivers/crypto/hisilicon/sec/sec_algs.c @@ -844,7 +844,7 @@ err_free_elements: if (crypto_skcipher_ivsize(atfm)) dma_unmap_single(info->dev, sec_req->dma_iv, crypto_skcipher_ivsize(atfm), - DMA_BIDIRECTIONAL); + DMA_TO_DEVICE); err_unmap_out_sg: if (split) sec_unmap_sg_on_err(skreq->dst, steps, splits_out, |
