Re: [PATCH v2] hwrng: fix khwrng lifecycle

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

 



On Wed, Dec 16, 2020 at 11:59:06AM +0100, Luca Dariz wrote:
>
> @@ -432,12 +433,15 @@ static int hwrng_fillfn(void *unused)
>  {
>  	long rc;
>  
> +	complete(&hwrng_started);
>  	while (!kthread_should_stop()) {
>  		struct hwrng *rng;
>  
>  		rng = get_current_rng();
> -		if (IS_ERR(rng) || !rng)
> -			break;
> +		if (IS_ERR(rng) || !rng) {
> +			msleep_interruptible(10);
> +			continue;

Please fix this properly with reference counting.

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



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

  Powered by Linux