[PATCH] [ping] nptl: Fix abort in case of set*id failure

Florian Weimer fweimer@redhat.com
Wed Jul 9 11:01:00 GMT 2014


On 07/09/2014 12:59 PM, Siddhesh Poyarekar wrote:
> On Wed, Jul 09, 2014 at 12:42:56PM +0200, Florian Weimer wrote:
>> Doesn't the stack_cache_lock in __nptl_setxid prevent this?  I don't know
>> what it does to async-signal-safety, and there is likely some issue here,
>> but I think your A/B case is properly locked out.
>
> Of course, I overlooked the lock.  The lock could then deadlock if
> thread A is holding the lock and it is interrupted by another signal
> and the handler also calls setxid.

Is there anything we can do about this?

(I don't plan to fix it with the current change, I'm just wondering if 
we can improve things further.  The same issue also appears in other 
contexts, and I wonder if there's some idiom which can be used to 
resolve it.)

-- 
Florian Weimer / Red Hat Product Security



More information about the Libc-alpha mailing list