This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 1/2] Fix robust mutex daedlock [BZ #20263]
- From: Andreas Schwab <schwab at suse dot de>
- To: Jiyoung Yun <t2wish at gmail dot com>
- Cc: libc-alpha at sourceware dot org, jy910 dot yun at samsung dot com
- Date: Wed, 29 Jun 2016 17:22:08 +0200
- Subject: Re: [PATCH v2 1/2] Fix robust mutex daedlock [BZ #20263]
- Authentication-results: sourceware.org; auth=none
- References: <1467212621-5522-1-git-send-email-t2wish at gmail dot com> <1467212621-5522-2-git-send-email-t2wish at gmail dot com>
Jiyoung Yun <t2wish@gmail.com> writes:
> diff --git a/nptl/lowlevelrobustlock.c b/nptl/lowlevelrobustlock.c
> index 3b988b2..e5d3758 100644
> --- a/nptl/lowlevelrobustlock.c
> +++ b/nptl/lowlevelrobustlock.c
> @@ -113,15 +113,20 @@ __lll_robust_timedlock_wait (int *futex, const struct timespec *abstime,
> && atomic_compare_and_exchange_bool_acq (futex, newval, oldval))
> continue;
>
> + int err;
> /* If *futex == 2, wait until woken or timeout. */
> #if (!defined __ASSUME_FUTEX_CLOCK_REALTIME \
> || !defined lll_futex_timed_wait_bitset)
> - lll_futex_timed_wait (futex, newval, &rt, private);
> + err = lll_futex_timed_wait (futex, newval, &rt, private);
I don't think this call should be checked for timeout because we want to
check the absolute time, not the relative time we computed here.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."