[Vortex] [BUG] Race condition around ctx->profiles_list

Francis Brosnan Blazquez francis at aspl.es
Thu Aug 19 20:09:12 CEST 2010

>         Hello,

Hi Benoit,

<I've found your message discarded>

>         I have a race condition with ctx->profiles_list in vortex_profiles.c
>         vortex_profiles_register & vortex_profiles_unregister are properly locked,
>         however, vortex_profiles_get_actual_list_ref() returns a pointer to
>         this list which is then accessed by multiple functions in
>         vortex_greetings.c
>         As those functions do not lock its access it can crash due to another
>         thread modifying the list concurrently.
>         Maybe something like acquire_list_ref and release_list_ref would be better ?
>         one function to acquire a reference to the list and lock the corresponding mutex
>         one function to release the reference and unlock its corresponding mutex.

Ok. Your proposal looks good to me. This will also ensure that a node
inside the list, representing a profile name, is not terminated by an
unregister operation...


>         Thank you,
>         Benoît Amiaux
Francis Brosnan Blazquez <francis at aspl.es>

More information about the Vortex mailing list