]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: sun8i-ce - do not fallback if cryptlen is less than sg length
authorCorentin Labbe <clabbe@baylibre.com>
Mon, 2 May 2022 20:19:29 +0000 (20:19 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 13 May 2022 09:24:48 +0000 (17:24 +0800)
commit33a59c67f522c334f5668ae0617cd46a32c84c34
tree6fdfa44fe1fc2a6bbd570808b5147b75e84841e8
parentd94d464fefad7e08c5a9d00b3a01056a06bb434a
crypto: sun8i-ce - 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-ce/sun8i-ce-cipher.c