diff options
author | Yanfei Xu <yanfei.xu@windriver.com> | 2021-03-12 12:54:08 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-03-14 16:33:59 +0000 |
commit | 3f8d6c0637ef47833f9b9375651c42a45574c378 (patch) | |
tree | c1467966440e73a6ad5ef4468ec1e1eacf19062d /meta/recipes-core | |
parent | a9d032345f78f7a46c455b69f9cf0268944729f7 (diff) | |
download | poky-3f8d6c0637ef47833f9b9375651c42a45574c378.tar.gz |
glibc: fix pthread_cond_destroy hangs with process-shared mutex
This bug can cause pthread_cond_destroy hang with process-shared
mutex. And it is since glibc-2.32, will be fixed in glibc-2.34.
(From OE-Core rev: 7d9c50a12d1b47474536c214f44dc4ff72c54402)
Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/glibc/glibc/0001-nptl-Remove-private-futex-optimization-BZ-27304.patch | 49 | ||||
-rw-r--r-- | meta/recipes-core/glibc/glibc_2.33.bb | 1 |
2 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0001-nptl-Remove-private-futex-optimization-BZ-27304.patch b/meta/recipes-core/glibc/glibc/0001-nptl-Remove-private-futex-optimization-BZ-27304.patch new file mode 100644 index 0000000000..39fde5b785 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0001-nptl-Remove-private-futex-optimization-BZ-27304.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From c4ad832276f4dadfa40904109b26a521468f66bc Mon Sep 17 00:00:00 2001 | ||
2 | From: Florian Weimer <fweimer@redhat.com> | ||
3 | Date: Thu, 4 Feb 2021 15:00:20 +0100 | ||
4 | Subject: [PATCH] nptl: Remove private futex optimization [BZ #27304] | ||
5 | |||
6 | It is effectively used, unexcept for pthread_cond_destroy, where we do | ||
7 | not want it; see bug 27304. The internal locks do not support a | ||
8 | process-shared mode. | ||
9 | |||
10 | This fixes commit dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl: | ||
11 | Move pthread_cond_destroy implementation into libc"). | ||
12 | |||
13 | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> | ||
14 | |||
15 | Upstream-Status: Backport [https://sourceware.org/bugzilla/show_bug.cgi?id=27304] | ||
16 | Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com> | ||
17 | --- | ||
18 | sysdeps/nptl/lowlevellock-futex.h | 14 +------------- | ||
19 | 1 file changed, 1 insertion(+), 13 deletions(-) | ||
20 | |||
21 | diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h | ||
22 | index ecb729da6b..ca96397a4a 100644 | ||
23 | --- a/sysdeps/nptl/lowlevellock-futex.h | ||
24 | +++ b/sysdeps/nptl/lowlevellock-futex.h | ||
25 | @@ -50,20 +50,8 @@ | ||
26 | #define LLL_SHARED FUTEX_PRIVATE_FLAG | ||
27 | |||
28 | #ifndef __ASSEMBLER__ | ||
29 | - | ||
30 | -# if IS_IN (libc) || IS_IN (rtld) | ||
31 | -/* In libc.so or ld.so all futexes are private. */ | ||
32 | -# define __lll_private_flag(fl, private) \ | ||
33 | - ({ \ | ||
34 | - /* Prevent warnings in callers of this macro. */ \ | ||
35 | - int __lll_private_flag_priv __attribute__ ((unused)); \ | ||
36 | - __lll_private_flag_priv = (private); \ | ||
37 | - ((fl) | FUTEX_PRIVATE_FLAG); \ | ||
38 | - }) | ||
39 | -# else | ||
40 | -# define __lll_private_flag(fl, private) \ | ||
41 | +# define __lll_private_flag(fl, private) \ | ||
42 | (((fl) | FUTEX_PRIVATE_FLAG) ^ (private)) | ||
43 | -# endif | ||
44 | |||
45 | # define lll_futex_syscall(nargs, futexp, op, ...) \ | ||
46 | ({ \ | ||
47 | -- | ||
48 | 2.27.0 | ||
49 | |||
diff --git a/meta/recipes-core/glibc/glibc_2.33.bb b/meta/recipes-core/glibc/glibc_2.33.bb index bb4b875800..5e0baa53e8 100644 --- a/meta/recipes-core/glibc/glibc_2.33.bb +++ b/meta/recipes-core/glibc/glibc_2.33.bb | |||
@@ -47,6 +47,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ | |||
47 | file://0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch \ | 47 | file://0032-string-Work-around-GCC-PR-98512-in-rawmemchr.patch \ |
48 | file://0033-x86-Handle-_SC_LEVEL1_ICACHE_LINESIZE-BZ-27444.patch \ | 48 | file://0033-x86-Handle-_SC_LEVEL1_ICACHE_LINESIZE-BZ-27444.patch \ |
49 | file://CVE-2021-27645.patch \ | 49 | file://CVE-2021-27645.patch \ |
50 | file://0001-nptl-Remove-private-futex-optimization-BZ-27304.patch \ | ||
50 | " | 51 | " |
51 | S = "${WORKDIR}/git" | 52 | S = "${WORKDIR}/git" |
52 | B = "${WORKDIR}/build-${TARGET_SYS}" | 53 | B = "${WORKDIR}/build-${TARGET_SYS}" |