diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2017-10-18 08:00:33 +0100 |
---|---|---|
committer | Mircea Pop <mircea.pop@nxp.com> | 2019-05-14 09:54:33 +0200 |
commit | e7f44829c5b6db57f40d8b3875777dfb1845d502 (patch) | |
tree | b4ab0ed95deccdcde336d913ec5b43ff01d6a503 /crypto/aes_generic.c | |
parent | 2934d959389f5ea3c15d7237f3acf6928c809f88 (diff) |
crypto: change transient busy return code to -ENOSPC
The crypto API was using the -EBUSY return value to indicate
both a hard failure to submit a crypto operation into a
transformation provider when the latter was busy and the backlog
mechanism was not enabled as well as a notification that the
operation was queued into the backlog when the backlog mechanism
was enabled.
Having the same return code indicate two very different conditions
depending on a flag is both error prone and requires extra runtime
check like the following to discern between the cases:
if (err == -EINPROGRESS ||
(err == -EBUSY && (ahash_request_flags(req) &
CRYPTO_TFM_REQ_MAY_BACKLOG)))
This patch changes the return code used to indicate a crypto op
failed due to the transformation provider being transiently busy
to -ENOSPC.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 6b80ea389a0bceee6a0a801474b78ad0a8cd034d)
Diffstat (limited to 'crypto/aes_generic.c')
0 files changed, 0 insertions, 0 deletions