musl: fix locking synchronization bug
authorMatthias Schiffer <mschiffer@universe-factory.net>
Sat, 23 May 2020 19:16:44 +0000 (21:16 +0200)
committerMatthias Schiffer <mschiffer@universe-factory.net>
Tue, 26 May 2020 21:50:37 +0000 (23:50 +0200)
commitb20a95f18159f251d4d7de50e3f3f0b1ca981f06
tree3b961d4e9b6c3c23ad829ede99c2c53e2f3cb524
parentff6c3120002158daa682e5c415e40e8b0a804ab1
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]