projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WIP: update tizen_qemu_defconfig
[platform/kernel/linux-starfive.git]
/
crypto
/
algapi.c
diff --git
a/crypto/algapi.c
b/crypto/algapi.c
index
5c69ff8
..
8c3a869
100644
(file)
--- a/
crypto/algapi.c
+++ b/
crypto/algapi.c
@@
-472,7
+472,9
@@
void crypto_unregister_alg(struct crypto_alg *alg)
if (WARN(ret, "Algorithm %s is not registered", alg->cra_driver_name))
return;
if (WARN(ret, "Algorithm %s is not registered", alg->cra_driver_name))
return;
- BUG_ON(refcount_read(&alg->cra_refcnt) != 1);
+ if (WARN_ON(refcount_read(&alg->cra_refcnt) != 1))
+ return;
+
if (alg->cra_destroy)
alg->cra_destroy(alg);
if (alg->cra_destroy)
alg->cra_destroy(alg);
@@
-942,6
+944,9
@@
EXPORT_SYMBOL_GPL(crypto_enqueue_request);
void crypto_enqueue_request_head(struct crypto_queue *queue,
struct crypto_async_request *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);
}
queue->qlen++;
list_add(&request->list, &queue->list);
}