From: Stephan Mueller Date: Fri, 26 May 2017 10:11:31 +0000 (+0200) Subject: crypto: drbg - Fixes panic in wait_for_completion call X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1803bec709f813eef95a0916b6dd9ec265cc757f;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git crypto: drbg - Fixes panic in wait_for_completion call commit b61929c654f2e725644935737c4c1ea9c741e2f8 upstream. Initialise ctr_completion variable before use. Cc: Signed-off-by: Harsh Jain Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- diff --git a/crypto/drbg.c b/crypto/drbg.c index 123d211efa12..8cac3d31a5f8 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -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) {