projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
crypto: api - Check spawn->alg under lock in crypto_drop_spawn
[platform/kernel/linux-rpi.git]
/
crypto
/
algapi.c
diff --git
a/crypto/algapi.c
b/crypto/algapi.c
index
de30ddc
..
b860889
100644
(file)
--- a/
crypto/algapi.c
+++ b/
crypto/algapi.c
@@
-669,11
+669,9
@@
EXPORT_SYMBOL_GPL(crypto_grab_spawn);
void crypto_drop_spawn(struct crypto_spawn *spawn)
{
- if (!spawn->alg)
- return;
-
down_write(&crypto_alg_sem);
- list_del(&spawn->list);
+ if (spawn->alg)
+ list_del(&spawn->list);
up_write(&crypto_alg_sem);
}
EXPORT_SYMBOL_GPL(crypto_drop_spawn);