mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 14:30:06 +00:00
Fix robust mutex daedlock [BZ #20263]
In Linux/ARM environment, a robust mutex can't catch the timeout result when it is already owned by other thread and requests to try lock with a specific time value(pthread_mutex_timedlock). The futex already returns the ETIMEDOUT result but there is no check the return value and it makes a deadlock. * nptl/lowlevelrobustlock.c: Implement ETIMEDOUT logic.
This commit is contained in:
parent
318132f4d4
commit
d3016ce02c
@ -1,3 +1,8 @@
|
||||
2016-07-07 Jiyoung Yun <t2wish@gmail.com>
|
||||
|
||||
[BZ #20263]
|
||||
* nptl/lowlevelrobustlock.c: Implement ETIMEDOUT logic.
|
||||
|
||||
2016-07-06 Stefan Liebler <stli@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/s390/linkmap.h (struct link_map_machine):
|
||||
|
@ -118,8 +118,11 @@ __lll_robust_timedlock_wait (int *futex, const struct timespec *abstime,
|
||||
|| !defined lll_futex_timed_wait_bitset)
|
||||
lll_futex_timed_wait (futex, newval, &rt, private);
|
||||
#else
|
||||
lll_futex_timed_wait_bitset (futex, newval, abstime,
|
||||
FUTEX_CLOCK_REALTIME, private);
|
||||
int err = lll_futex_timed_wait_bitset (futex, newval, abstime,
|
||||
FUTEX_CLOCK_REALTIME, private);
|
||||
/* The futex call timed out. */
|
||||
if (err == -ETIMEDOUT)
|
||||
return -err;
|
||||
#endif
|
||||
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user