]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: sun8i-ss - do not fallback if cryptlen is less than sg length
authorCorentin Labbe <clabbe@baylibre.com>
Mon, 2 May 2022 20:19:25 +0000 (20:19 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 13 May 2022 09:24:20 +0000 (17:24 +0800)
commit77c8fc60a00e5ac94b1d9404268d1b52674297e8
tree82906f123800addbea19f0a117f54015894a7859
parentc788a3c65b5f006050ad3df346e9fc13c51d299e
crypto: sun8i-ss - do not fallback if cryptlen is less than sg length

The sg length could be more than remaining data on it.
So check the length requirement against the minimum between those two
values.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c