Re: [PATCH] random: remove mostly unused async readiness notifier

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

 



Hi Petr,

On Wed, May 18, 2022 at 10:54:22AM +0200, Petr Mladek wrote:
> > +		spin_lock_irqsave(&filling, flags);
> 
> I thought more about this and there is a small risk of a deadlock
> when get_random_bytes() or queue_work() or NMI calls
> printk()/vsprintf() with %p here.
> 
> A simple solution would be to use trylock():
> 
> 		if (!spin_trylock_irqsave(&filling, flags))
> 			return -EDEADLK;
> 
> Could we do this change, please?
> 
> I do not mind if it will be done by re-spinning the original
> patch or another patch on top of it.

Interesting consideration. Sure, I'll do exactly that and send a v2.

Jason



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

  Powered by Linux