projects
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
crypto: api - Fix crypto_drop_spawn crash on blank spawns
[linux.git]
/
crypto
/
algapi.c
diff --git
a/crypto/algapi.c
b/crypto/algapi.c
index 2154815201a724f473d67c18d7ade8bd2cbdc5e3..6a98076d9d2a2eae84ab853ee25c63baa8fd66f6 100644
(file)
--- a/
crypto/algapi.c
+++ b/
crypto/algapi.c
@@
-507,6
+507,9
@@
EXPORT_SYMBOL_GPL(crypto_init_spawn2);
void crypto_drop_spawn(struct crypto_spawn *spawn)
{
+ if (!spawn->alg)
+ return;
+
down_write(&crypto_alg_sem);
list_del(&spawn->list);
up_write(&crypto_alg_sem);