Commit b61929c6 authored by Stephan Mueller's avatar Stephan Mueller Committed by Herbert Xu

crypto: drbg - Fixes panic in wait_for_completion call

Initialise ctr_completion variable before use.

Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarHarsh Jain <harshjain.prof@gmail.com>
Signed-off-by: default avatarStephan Mueller <smueller@chronox.de>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent d41519a6
...@@ -1691,6 +1691,7 @@ static int drbg_init_sym_kernel(struct drbg_state *drbg) ...@@ -1691,6 +1691,7 @@ static int drbg_init_sym_kernel(struct drbg_state *drbg)
return PTR_ERR(sk_tfm); return PTR_ERR(sk_tfm);
} }
drbg->ctr_handle = sk_tfm; drbg->ctr_handle = sk_tfm;
init_completion(&drbg->ctr_completion);
req = skcipher_request_alloc(sk_tfm, GFP_KERNEL); req = skcipher_request_alloc(sk_tfm, GFP_KERNEL);
if (!req) { if (!req) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment