]> 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:05:02 +0000 (12:05 +0200)
commitd94de7bade8ba3117afe81bbaac2155f5beb0907
tree3e6636abcb50a0c5487c808affe6933e9e37142b
parent7cf6bccb4dee32488e40ddc644814ded5418fabc
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