aboutsummaryrefslogtreecommitdiff
path: root/crypto/algapi.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2017-12-11 17:01:08 +1100
committerJames Morris <james.l.morris@oracle.com>2017-12-11 17:01:08 +1100
commitd21bd6898336a7892914d308d5e0868f0b863571 (patch)
treef5f756c25348b5a6c1ce9ddbaa7d1ecd1bef40b0 /crypto/algapi.c
parent34d8751fd4ffa34e85ee7e85d34168b3f3f62b42 (diff)
parent50c4c4e268a2d7a3e58ebb698ac74da0de40ae36 (diff)
downloadlinux-d21bd6898336a7892914d308d5e0868f0b863571.tar.gz
linux-d21bd6898336a7892914d308d5e0868f0b863571.tar.bz2
linux-d21bd6898336a7892914d308d5e0868f0b863571.zip
Sync to v4.15-rc3 for security subsystem developers to work against.
Diffstat (limited to 'crypto/algapi.c')
-rw-r--r--crypto/algapi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c
index aa699ff6c876..60d7366ed343 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -897,9 +897,11 @@ int crypto_enqueue_request(struct crypto_queue *queue,
int err = -EINPROGRESS;
if (unlikely(queue->qlen >= queue->max_qlen)) {
- err = -EBUSY;
- if (!(request->flags & CRYPTO_TFM_REQ_MAY_BACKLOG))
+ if (!(request->flags & CRYPTO_TFM_REQ_MAY_BACKLOG)) {
+ err = -ENOSPC;
goto out;
+ }
+ err = -EBUSY;
if (queue->backlog == &queue->list)
queue->backlog = &request->list;
}