diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2017-06-28 10:22:03 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-07-12 18:38:06 +0800 |
commit | 1606043f214f912a52195293614935811a6e3e53 (patch) | |
tree | 54f5a9ab508836a66fed2de2b025be85e0903631 /drivers/crypto/atmel-sha.c | |
parent | 2acce6aa9f6569d4e135b2c4cfb56acce95efaeb (diff) | |
download | op-kernel-dev-1606043f214f912a52195293614935811a6e3e53.zip op-kernel-dev-1606043f214f912a52195293614935811a6e3e53.tar.gz |
crypto: atmel - only treat EBUSY as transient if backlog
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: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/atmel-sha.c')
-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 a948202..dad4e5b 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -1204,7 +1204,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; /* |