lkml.org 
[lkml]   [2015]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v6 1/5] random: Blocking API for accessing nonblocking_pool
Date
Am Montag, 18. Mai 2015, 15:07:10 schrieb Stephan Mueller:

Hi Herbert,

>>
>>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


\
 
 \ /
  Last update: 2015-05-18 16:01    [W:0.838 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site