Race condition in tdb_runtime_check_for_robust_mutexes()

Uri Simchoni uri at samba.org
Tue Mar 29 10:43:08 UTC 2016


On 03/29/2016 01:41 PM, Ralph Boehme wrote:
> On Tue, Mar 29, 2016 at 01:22:35PM +0300, Uri Simchoni wrote:
>> On 03/29/2016 01:03 PM, Uri Simchoni wrote:
>>> On 03/29/2016 12:52 PM, Uri Simchoni wrote:
>>>> Pushed with my RB+
>>>
>>> ..once again with the removed unused status :)
>>>
>>>
>> OK this is becoming embarrassing.
>>
>> Please review the attached - jumping to cleanup_m instead of cleanup_ma
>> after pthread_sigmask().
> 
> thanks for spotting this! Pushed.
> 
> I was already seriously considering adding a second patch that changes
> the cleanup logic to use state flags instead of gotos, eg
> 
>   bool cleanup_mutex = false;
> 
>   ret = pthread_mutex_init(...);
>   if (ret != 0) {
>     goto cleanup;
>   }
>   cleanup_mutex = true; 
> 
>   ...
> 
> cleanup:
>   if (cleanup_mutex) {
>     ...cleanup mutex...
>   }
> 
> Cheerio!
> -slow
> 
Seems like the thing we should do, considering the empirical evidence...



More information about the samba-technical mailing list