diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2017-06-28 10:22:03 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-21 07:42:23 +0200 |
commit | 81cc2ef2677b32252d23b50e6cef7c994bf6ec03 (patch) | |
tree | 9b0f3c955f64aaa25f31aaedf58d59857f1fac7b /drivers/crypto | |
parent | 2ff2cc768eb75b82b5df60d06e8316d4ea62c111 (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/crypto')
-rw-r--r-- | drivers/crypto/atmel-sha.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index 97e34799e077..6fcf25f795d4 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -1000,7 +1000,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; /* |