linux-stable/drivers/crypto/inside-secure
Nikita Zhandarovich 4c0ac81a17 crypto: safexcel - Add error handling for dma_map_sg() calls
[ Upstream commit 87e02063d0 ]

Macro dma_map_sg() may return 0 on error. This patch enables
checks in case of the macro failure and ensures unmapping of
previously mapped buffers with dma_unmap_sg().

Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.

Fixes: 49186a7d9e ("crypto: inside_secure - Avoid dma map if size is zero")
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
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>
2024-01-25 15:27:21 -08:00
..
Makefile
safexcel.c crypto: safexcel - Cleanup ring IRQ workqueues on load failure 2023-05-11 23:03:02 +09:00
safexcel.h crypto: inside-secure - fix packed bit-field result descriptor 2022-07-08 15:21:17 +08:00
safexcel_cipher.c crypto: safexcel - Add error handling for dma_map_sg() calls 2024-01-25 15:27:21 -08:00
safexcel_hash.c crypto: inside-secure - Replace generic aes with libaes 2022-09-24 16:14:43 +08:00
safexcel_ring.c