crypto: drbg - Fixes panic in wait_for_completion call
authorStephan Mueller <smueller@chronox.de>
Fri, 26 May 2017 10:11:31 +0000 (12:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Jul 2017 13:01:07 +0000 (15:01 +0200)
commit b61929c654f2e725644935737c4c1ea9c741e2f8 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/drbg.c

index 123d211efa1294edabf952d6d07638d2654a5e3f..8cac3d31a5f8643b92ae2f3ffbff4871594256b1 100644 (file)
@@ -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) {