[PATCH][BZ #14652] Fix deadlock on PI mutex in pthread_cond_wait cleanup handler
Siddhesh Poyarekar
siddhesh@redhat.com
Fri Oct 5 02:33:00 GMT 2012
On Thu, 04 Oct 2012 15:50:18 -0600, Jeff wrote:
> + andl $(ROBUST_BIT|PI_BIT), %ebx
> + cmpl $PI_BIT, %ebx
> What's the point behind including ROBUST_BIT in the mask here?
It's because we do requeue_pi only when the mutex is non-robust and PI.
> + movl (%eax), %ebx
> + andl $TID_MASK, %ebx
> + cmpl %ebx, %gs:TID
> + je 9f
> So when the TID doesn't match don't lock and just bail out? Is that
> really the right thing to do?
It's the other way around. If the TIDs match, we don't lock and bail
out, because it means that we already had the lock.
Regards,
Siddhesh
More information about the Libc-alpha
mailing list