[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150520184535.GA15438@gondor.apana.org.au>
Date: Thu, 21 May 2015 02:45:35 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Stephan Mueller <smueller@...onox.de>
Cc: pebolle@...cali.nl, andreas.steffen@...ongswan.org, tytso@....edu,
sandyinchina@...il.com, linux-kernel@...r.kernel.org,
linux-crypto@...r.kernel.org
Subject: Re: [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@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists