Re: [PATCH] hw_random: core, sleep interruptible in read

2015-11-27 Thread Jiri Slaby
On 11/27/2015, 02:06 PM, Herbert Xu wrote: > On Thu, Nov 26, 2015 at 08:56:29PM +0100, Jiri Slaby wrote: >> >> diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c >> index a064237ff362..f003df162e09 100644 >> --- a/drivers/char/hw_random/core.c >> +++ b/drivers/char/hw_random

Re: [PATCH] hw_random: core, sleep interruptible in read

2015-11-27 Thread Herbert Xu
On Thu, Nov 26, 2015 at 08:56:29PM +0100, Jiri Slaby wrote: > > diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c > index a064237ff362..f003df162e09 100644 > --- a/drivers/char/hw_random/core.c > +++ b/drivers/char/hw_random/core.c > @@ -238,7 +238,10 @@ static ssize_t rng_

[PATCH] hw_random: core, sleep interruptible in read

2015-11-26 Thread Jiri Slaby
hwrng kthread can be waiting via hwrng_fillfn for some data from a rng like virtio-rng: hwrng D 880093e17798 0 382 2 0x ... Call Trace: [] wait_for_completion_killable+0x96/0x210 [] virtio_read+0x57/0xf0 [virtio_rng] [] hwrng_fillfn+0x75/0x130 [] kthread+0xf3/0x