Date: Tue, 30 Jun 2020 15:54:10 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: Potential deadlock in pthread_kill() On Tue, Jun 30, 2020 at 10:28:50PM +0300, Dmitry Samersoff wrote: > Hello all, > > Does it make sense to trylock and immediately return ESRCH if > pthread_kill is already in progress? No, ESRCH is not a valid result for this condition. Moreover killlock being taken does not tell you that pthread_kill is already in progress targeting the same thread, just that something that needs the kernel tid to be valid (kill, cancel, or scheduling changes) or that needs to change its validity (exiting) is in progress. Note that for fixing this issue, it won't suffice just to make pthread_kill block signals. The other places that use the killlock also need to block signals, to make the lock fully AS-safe. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.