Skip to content

Commit fc43f09

Browse files
Gilad Ben-Yossefgregkh
authored andcommitted
crypto: atmel - only treat EBUSY as transient if backlog
commit 1606043f214f912a52195293614935811a6e3e53 upstream. 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. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent d05fbdb commit fc43f09

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/crypto/atmel-sha.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,9 @@ static int atmel_sha_finup(struct ahash_request *req)
963963
ctx->flags |= SHA_FLAGS_FINUP;
964964

965965
err1 = atmel_sha_update(req);
966-
if (err1 == -EINPROGRESS || err1 == -EBUSY)
966+
if (err1 == -EINPROGRESS ||
967+
(err1 == -EBUSY && (ahash_request_flags(req) &
968+
CRYPTO_TFM_REQ_MAY_BACKLOG)))
967969
return err1;
968970

969971
/*

0 commit comments

Comments
 (0)