Re: crypto: drbg - Initialise mutex in drbg_healthcheck_sanity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Montag, 20. April 2015, 11:26:48 schrieb Herbert Xu:

Hi Herbert,

> 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@xxxxxxxxxxxxxxxxxxx>

Acked-by: Stephan Mueller <smueller@xxxxxxxxxx>
> 
> diff --git a/crypto/drbg.c b/crypto/drbg.c
> index 30ec2a6..57fd479 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


-- 
Ciao
Stephan
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux