Thread (9 messages) 9 messages, 2 authors, 2015-05-20

Re: [PATCH v7 1/5] random: Blocking API for accessing nonblocking_pool

From: Stephan Mueller <hidden>
Date: 2015-05-20 18:49:50
Also in: lkml

Am Donnerstag, 21. Mai 2015, 02:45:35 schrieb Herbert Xu:

Hi Herbert,
On Wed, May 20, 2015 at 07:44:39PM +0200, Stephan Mueller wrote:
quoted
+	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.
Sorry, I overlooked the availability of wait_event. I was looking for it 
initially, but missed it. I will fix it right away.

-- 
Ciao
Stephan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help