]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:08:53 +0000 (12:08 +0200)
commita762bbe1126982ceb64e4a0e3cda51171ad92231
treecfd934887835bc62004aa6e0f467f919941160b7
parentb86fd2e61a2c6eb80b19ae407c7441c5a79cb0aa
crypto: inside-secure - Fix `dma_unmap_sg()` nents value

[ Upstream commit cb7fa6b6fc71e0c801e271aa498e2f19e6df2931 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/inside-secure/safexcel_hash.c