]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: af_alg - Fix regression on empty requests
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 2 Jul 2020 03:32:21 +0000 (13:32 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 Jul 2020 08:25:22 +0000 (18:25 +1000)
commit674ac4a34033994fad0ea797899baf12b17bff75
tree6ffd6265d927924b7bd9cb7be1e9e1cdfe21d76e
parent9c1f58397ef5f965cd89f008b16e1295c05c6f5f
crypto: af_alg - Fix regression on empty requests

Some user-space programs rely on crypto requests that have no
control metadata.  This broke when a check was added to require
the presence of control metadata with the ctx->init flag.

This patch fixes the regression by setting ctx->init as long as
one sendmsg(2) has been made, with or without a control message.

Reported-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Fixes: 762489a77ba8 ("crypto: algif_aead - Only wake up when...")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/af_alg.c