]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: inside-secure - Fix `dma_unmap_sg()` nents value
authorThomas Fourier <fourier.thomas@gmail.com>
Fri, 20 Jun 2025 07:29:26 +0000 (09:29 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 7 Jul 2025 03:27:04 +0000 (15:27 +1200)
commitcb7fa6b6fc71e0c801e271aa498e2f19e6df2931
tree9c714619e8612d82892c87055944f545e61809ed
parentb4abeccb8d39db7d9b51cb0098d6458760b30a75
crypto: inside-secure - Fix `dma_unmap_sg()` nents value

The `dma_unmap_sg()` functions should be called with the same nents as the
`dma_map_sg()`, not the value the map function returned.

Fixes: c957f8b3e2e5 ("crypto: inside-secure - avoid unmapping DMA memory that was not mapped")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Antoine Tenart <atenart@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/inside-secure/safexcel_hash.c