lkml.org 
[lkml]   [2015]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 1/5] random: Blocking API for accessing nonblocking_pool
On Wed, May 20, 2015 at 07:44:39PM +0200, Stephan Mueller wrote:
>
> + if (unlikely(nonblocking_pool.initialized == 0)) {
> + do {
> + rc = wait_event_interruptible(urandom_init_wait,
> + nonblocking_pool.initialized);
> + } while (rc == -ERESTARTSYS);

This is just a convoluted way of doing an uninterruptible sleep.
Either make it uninterruptible or allow the function to return
an error.

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


\
 
 \ /
  Last update: 2015-05-20 21:21    [W:0.054 / U:1.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site