Эх сурвалжийг харах

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 <herbert@gondor.apana.org.au>
Acked-by: Stephan Mueller <smueller@chronox.de>
Herbert Xu 10 жил өмнө
parent
commit
e11a754813
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      crypto/drbg.c

+ 2 - 0
crypto/drbg.c

@@ -1741,6 +1741,8 @@ static inline int __init drbg_healthcheck_sanity(void)
 	if (!drbg)
 	if (!drbg)
 		return -ENOMEM;
 		return -ENOMEM;
 
 
+	mutex_init(&drbg->drbg_mutex);
+
 	/*
 	/*
 	 * if the following tests fail, it is likely that there is a buffer
 	 * if the following tests fail, it is likely that there is a buffer
 	 * overflow as buf is much smaller than the requested or provided
 	 * overflow as buf is much smaller than the requested or provided