Skip to content
Commit bc5ace67 authored by Carlos O'Donell's avatar Carlos O'Donell Committed by Florian Weimer
Browse files

mutex: Fix robust mutex lock acquire (Bug 21778)

65810f0e fixed a robust mutex bug but
introduced BZ 21778: if the CAS used to try to acquire a lock fails, the
expected value is not updated, which breaks other cases in the loce
acquisition loop.  The fix is to simply update the expected value with
the value returned by the CAS, which ensures that behavior is as if the
first case with the CAS never happened (if the CAS fails).

This is a regression introduced in the last release.

Tested on x86_64, i686, ppc64, ppc64le, s390x, aarch64, armv7hl.

(cherry picked from commit 5920a4a6)
parent 4b3a995a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment