diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-05-07 10:57:14 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-05-07 10:57:14 -0700 |
commit | 6f69c981811c8b019d7882839e31c34ea8330860 (patch) | |
tree | 819284601e1f68d3231baaad10b0f375b57d8a77 /crypto/algapi.c | |
parent | 63342b1dd5f884d97b41b0cd04fae01a69e0a762 (diff) | |
parent | b8969a1b69672b163d057e7745ebc915df689211 (diff) |
Merge tag 'v6.4-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
- A long-standing bug in crypto_engine
- A buggy but harmless check in the sun8i-ss driver
- A regression in the CRYPTO_USER interface
* tag 'v6.4-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: api - Fix CRYPTO_USER checks for report function
crypto: engine - fix crypto_queue backlog handling
crypto: sun8i-ss - Fix a test in sun8i_ss_setup_ivs()
Diffstat (limited to 'crypto/algapi.c')
-rw-r--r-- | crypto/algapi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index d7eb8f9e9883..5e7cd603d489 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -961,6 +961,9 @@ EXPORT_SYMBOL_GPL(crypto_enqueue_request); void crypto_enqueue_request_head(struct crypto_queue *queue, struct crypto_async_request *request) { + if (unlikely(queue->qlen >= queue->max_qlen)) + queue->backlog = queue->backlog->prev; + queue->qlen++; list_add(&request->list, &queue->list); } |