This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]