Commit fe3c5206adc5d7395828185ab73e9a522655b984

Authored by Herbert Xu
1 parent 2e290f43dd

[CRYPTO] api: Wake up all waiters when larval completes

Right now when a larval matures or when it dies of an error we
only wake up one waiter.  This would cause other waiters to timeout
unnecessarily.  This patch changes it to use complete_all to wake
up all waiters.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Showing 2 changed files with 3 additions and 3 deletions Side-by-side Diff

... ... @@ -34,7 +34,7 @@
34 34 if (alg) {
35 35 if (crypto_is_larval(alg)) {
36 36 struct crypto_larval *larval = (void *)alg;
37   - complete(&larval->completion);
  37 + complete_all(&larval->completion);
38 38 }
39 39 crypto_mod_put(alg);
40 40 }
... ... @@ -164,7 +164,7 @@
164 164 continue;
165 165  
166 166 larval->adult = alg;
167   - complete(&larval->completion);
  167 + complete_all(&larval->completion);
168 168 continue;
169 169 }
170 170  
... ... @@ -144,7 +144,7 @@
144 144 down_write(&crypto_alg_sem);
145 145 list_del(&alg->cra_list);
146 146 up_write(&crypto_alg_sem);
147   - complete(&larval->completion);
  147 + complete_all(&larval->completion);
148 148 crypto_alg_put(alg);
149 149 }
150 150