From: Herbert Xu Date: Mon, 20 Apr 2015 03:26:48 +0000 (+0800) Subject: crypto: drbg - Initialise mutex in drbg_healthcheck_sanity X-Git-Tag: firefly_0821_release~176^2~1617^2~270 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e11a754813e28dbfab63a23ae8fd22e9198489e1;p=firefly-linux-kernel-4.4.55.git crypto: drbg - Initialise mutex in drbg_healthcheck_sanity As we moved the mutex init out of drbg_instantiate and into cra_init we need to explicitly initialise the mutex in drbg_healthcheck_sanity. Signed-off-by: Herbert Xu Acked-by: Stephan Mueller --- diff --git a/crypto/drbg.c b/crypto/drbg.c index 30ec2a624b70..57fd479b8f77 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -1741,6 +1741,8 @@ static inline int __init drbg_healthcheck_sanity(void) if (!drbg) return -ENOMEM; + mutex_init(&drbg->drbg_mutex); + /* * if the following tests fail, it is likely that there is a buffer * overflow as buf is much smaller than the requested or provided