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:49:40 +0000 (23:49 +0200)
commit83b714a27ff3f3a394dfb1c8f6f05467a093a91a
treea01efc5871606ccb47220c25cb5f28458395f0a2
parentf99b1d1d92383ea41cc42d89b505b01fceb42fc1
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]