Skip to content

Commit

Permalink
crypto: drbg - Fixes panic in wait_for_completion call
Browse files Browse the repository at this point in the history
Initialise ctr_completion variable before use.

Cc: <stable@vger.kernel.org>
Signed-off-by: Harsh Jain <harshjain.prof@gmail.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
smuellerDD authored and herbertx committed Jun 22, 2017
1 parent d41519a commit b61929c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/drbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1691,6 +1691,7 @@ static int drbg_init_sym_kernel(struct drbg_state *drbg)
return PTR_ERR(sk_tfm);
}
drbg->ctr_handle = sk_tfm;
init_completion(&drbg->ctr_completion);

req = skcipher_request_alloc(sk_tfm, GFP_KERNEL);
if (!req) {
Expand Down

0 comments on commit b61929c

Please sign in to comment.