]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: algif_aead - Only wake up when ctx->more is zero
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 29 May 2020 14:23:49 +0000 (00:23 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 18 Jun 2020 07:19:44 +0000 (17:19 +1000)
commit762489a77ba8e00588f1d22c9c0014d4cacc83cc
treed0cc454c65a9ee0a9dc741c3ce32969a1b28be8a
parent5a79c8a439daa6e93420663ebb8f6bd4f5b04bd8
crypto: algif_aead - Only wake up when ctx->more is zero

AEAD does not support partial requests so we must not wake up
while ctx->more is set.  In order to distinguish between the
case of no data sent yet and a zero-length request, a new init
flag has been added to ctx.

SKCIPHER has also been modified to ensure that at least a block
of data is available if there is more data to come.

Fixes: 62b7d3341878 ("crypto: af_alg - consolidation of...")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/af_alg.c
crypto/algif_aead.c
crypto/algif_skcipher.c
include/crypto/if_alg.h