Thread (26 messages) 26 messages, 3 authors, 2015-06-05

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

From: Stephan Mueller <hidden>
Date: 2015-05-18 13:26:26
Also in: lkml

Am Montag, 18. Mai 2015, 15:07:10 schrieb Stephan Mueller:

Hi Herbert,
quoted
You can simplify this further and get rid of buf/nbytes.  All
we need to know is whether the pool is ready.  Everything else
can come from private.
So, the async function is now just a notification of the caller. Sounds good
with me.
I am just running into an interesting problem with a missing cancel operation: 
a caller instantiates a DRBG handle and invokes the seeding operation. The 
nonblocking_pool is not initialized. Therefore, the callback is put onto the 
list for being processed later.

Now, the caller releases the DRBG handle *before* the callback is triggered.

The callback is triggered with a pointer that is invalid, but the pointer is 
non-NULL. Therefore, I am not sure how to validate the pointer in the callback 
function.

I would think that there is no other way than to add a cancel API call that 
allows removing a list entry from the wait list.


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