Commit b257b48c authored by Herbert Xu's avatar Herbert Xu

crypto: lrw - Fix atomic sleep when walking skcipher

When we perform a walk in the completion function, we need to ensure
that it is atomic.

Fixes: ac3c8f36 ("crypto: lrw - Do not use auxiliary buffer")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Acked-by: default avatarOndrej Mosnacek <omosnace@redhat.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 44427c0f
...@@ -212,8 +212,12 @@ static void crypt_done(struct crypto_async_request *areq, int err) ...@@ -212,8 +212,12 @@ static void crypt_done(struct crypto_async_request *areq, int err)
{ {
struct skcipher_request *req = areq->data; struct skcipher_request *req = areq->data;
if (!err) if (!err) {
struct rctx *rctx = skcipher_request_ctx(req);
rctx->subreq.base.flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP;
err = xor_tweak_post(req); err = xor_tweak_post(req);
}
skcipher_request_complete(req, err); skcipher_request_complete(req, err);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment