musl: fix locking synchronization bug
authorMatthias Schiffer <mschiffer@universe-factory.net>
Sat, 23 May 2020 19:16:44 +0000 (21:16 +0200)
committerRISCi_ATOM <Bob@bobcall.me>
Wed, 27 May 2020 17:20:38 +0000 (17:20 +0000)
commiteac715b04e1accdc481f7e339235b3ea5cf5489e
treedcf7728593d13e979d57f4959b52fe135cfcf255
parent1beb2afc0f17f7d67133f8c1b1e380b659179caf
musl: fix locking synchronization bug

Import proposed upstream fix [2] for the critical locking
synchronization bug recently found in musl [1].

This affects all programs that are temporarily multithreaded, but then
return to single-threaded operation.

[1] https://www.openwall.com/lists/musl/2020/05/22/3
[2] https://www.openwall.com/lists/musl/2020/05/22/10

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit 10c211031ccd4703230493025a5a3b9d6fcad2f2)
toolchain/musl/patches/500-0002-don-t-use-libc.threads_minus_1-as-relaxed-atomic-for.patch [new file with mode: 0644]