[Vortex] [BUG] Race condition in vortex_remove_on_close_full
Francis Brosnan Blazquez
francis at aspl.es
Thu Aug 19 20:02:39 CEST 2010
> Hello,
Hi Benoit,
> I have a race condition in vortex_connection_remove_on_close_full
> Looking at the code, it seems that the access to the axl_list
> connection::on_close_full is not protected inside
> __vortex_connection_invoke_on_close
> Attached patch locks handlers_mutex before calling the handler,
> however I am not sure whether it is good behavior to call an external
> callback while being locked inside vortex.
>
> Any comments ?
Give a try to the path. As you suspect, it is problematic to acquire
that mutex and then jumping into the user application. That will produce
a DL.
Try implementing a patch that internally acquire the mutex, get a
reference to the handler and the data (with independent pointers) and
then release the mutex before calling user space.
Cheers!
--
Francis Brosnan Blazquez <francis at aspl.es>
ASPL
More information about the Vortex
mailing list