Commit f04dc46b authored by Gilad Ben-Yossef's avatar Gilad Ben-Yossef Committed by Sasha Levin

crypto: atmel - only treat EBUSY as transient if backlog

[ Upstream commit 1606043f ]

The Atmel SHA driver was treating -EBUSY as indication of queueing
to backlog without checking that backlog is enabled for the request.

Fix it by checking request flags.

Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 05398f6d
...@@ -963,7 +963,9 @@ static int atmel_sha_finup(struct ahash_request *req) ...@@ -963,7 +963,9 @@ static int atmel_sha_finup(struct ahash_request *req)
ctx->flags |= SHA_FLAGS_FINUP; ctx->flags |= SHA_FLAGS_FINUP;
err1 = atmel_sha_update(req); err1 = atmel_sha_update(req);
if (err1 == -EINPROGRESS || err1 == -EBUSY) if (err1 == -EINPROGRESS ||
(err1 == -EBUSY && (ahash_request_flags(req) &
CRYPTO_TFM_REQ_MAY_BACKLOG)))
return err1; return err1;
/* /*
......
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