]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ccree - don't attempt 0 len DMA mappings
authorGilad Ben-Yossef <gilad@benyossef.com>
Thu, 17 Feb 2022 19:27:26 +0000 (21:27 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 23 Feb 2022 03:28:32 +0000 (15:28 +1200)
commitd5415ccad192cf1e7c7ba4d1ebd2a874a77e74a7
tree458d7f641ebf58f0b3e9aaab187f7db07a07d7fc
parent1b31da6d48496d58e5e6c20ef39559713c627121
crypto: ccree - don't attempt 0 len DMA mappings

Refuse to try mapping zero bytes as this may cause a fault
on some configurations / platforms and it seems the prev.
attempt is not enough and we need to be more explicit.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Fixes: cca0c1f3fc12 ("crypto: ccree - protect against empty or NULL
scatterlists")
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_buffer_mgr.c