diff --git a/crypto/algapi.c b/crypto/algapi.c index 36384998394116c9f5ecd33fc9a64ae775b51680..4c761f48110dcda4348bf42eb7be6b45f206bdbf 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -734,6 +734,9 @@ EXPORT_SYMBOL_GPL(crypto_grab_spawn); void crypto_drop_spawn(struct crypto_spawn *spawn) { + if (!spawn->alg) /* not yet initialized? */ + return; + down_write(&crypto_alg_sem); if (!spawn->dead) list_del(&spawn->list);