summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGilad Ben-Yossef <gilad@benyossef.com>2017-06-28 10:22:03 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-21 07:44:58 +0200
commitfc43f0935035008a65e1a8ed50c99679dce65377 (patch)
tree0853d5244ea643865dfb59ba9b0b88b5d2892f0a /drivers
parentd05fbdbe6d1c2b00f1d2c3010a4a4c710fb4097a (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/atmel-sha.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c
index 0dadb6332f0e..7abe908427df 100644
--- a/drivers/crypto/atmel-sha.c
+++ b/drivers/crypto/atmel-sha.c
@@ -963,7 +963,9 @@ static int atmel_sha_finup(struct ahash_request *req)
ctx->flags |= SHA_FLAGS_FINUP;
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;
/*