summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-03-13 15:25:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-22 00:31:47 +0100
commit1b57d8c575cd29869dffb41047f2e8621f505457 (patch)
treecb9b7209acbbf67cdd2324de12b4ea20cd53d5af /meta/recipes-core
parent50f33d3bfebcbfb1538d932fb487cfd789872026 (diff)
downloadpoky-1b57d8c575cd29869dffb41047f2e8621f505457.tar.gz
glibc: Drop upstream rejected patches
These patches were applied, hoping that they will eventually be accepted upstream but they have been rejected, I think its best that they are dropped so we can avoid novel unintended behaviours that no other distros will be seeing (From OE-Core rev:54550aa42378ce4b215bccbfd95e5e650b0d2efa) (From OE-Core rev: dc2238b268d48b4e62a795a4f6b257efc298e2b2) Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch37
-rw-r--r--meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch65
-rw-r--r--meta/recipes-core/glibc/glibc_2.28.bb2
3 files changed, 0 insertions, 104 deletions
diff --git a/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch b/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch
deleted file mode 100644
index 71ddc1234b..0000000000
--- a/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From efb0fca7db742f4195e1771d8ba4c7fba4938819 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 27 Jan 2018 10:05:07 -0800
4Subject: [PATCH] reset dl_load_write_lock after forking
5
6The patch in this Bugzilla entry was requested by a customer:
7
8 https://www.sourceware.org/bugzilla/show_bug.cgi?id=19282
9
10The __libc_fork() code reset dl_load_lock, but it also needed to reset
11dl_load_write_lock. The patch has not yet been integrated upstream.
12
13Upstream-Status: Pending [ No Author See bugzilla]
14
15Signed-off-by: Damodar Sonone <damodar.sonone@kpit.com>
16Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 sysdeps/nptl/fork.c | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
23index ec56a827eb..0f48933ff1 100644
24--- a/sysdeps/nptl/fork.c
25+++ b/sysdeps/nptl/fork.c
26@@ -130,9 +130,9 @@ __libc_fork (void)
27 _IO_list_resetlock ();
28 }
29
30- /* Reset the lock the dynamic loader uses to protect its data. */
31+ /* Reset the locks the dynamic loader uses to protect its data. */
32 __rtld_lock_initialize (GL(dl_load_lock));
33-
34+ __rtld_lock_initialize (GL(dl_load_write_lock));
35 /* Run the handlers registered for the child. */
36 __run_fork_handlers (atfork_run_child);
37 }
diff --git a/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch b/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch
deleted file mode 100644
index dd37f2cd4d..0000000000
--- a/meta/recipes-core/glibc/glibc/0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1From 6ea962e0946da7564a774b08dd3eda28d64e9e56 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 27 Jan 2018 10:08:04 -0800
4Subject: [PATCH] Acquire ld.so lock before switching to malloc_atfork
5
6The patch is from
7 https://sourceware.org/bugzilla/show_bug.cgi?id=4578
8
9If a thread happens to hold dl_load_lock and have r_state set to RT_ADD or
10RT_DELETE at the time another thread calls fork(), then the child exit code
11from fork (in nptl/sysdeps/unix/sysv/linux/fork.c in our case) re-initializes
12dl_load_lock but does not restore r_state to RT_CONSISTENT. If the child
13subsequently requires ld.so functionality before calling exec(), then the
14assertion will fire.
15
16The patch acquires dl_load_lock on entry to fork() and releases it on exit
17from the parent path. The child path is initialized as currently done.
18This is essentially pthreads_atfork, but forced to be first because the
19acquisition of dl_load_lock must happen before malloc_atfork is active
20to avoid a deadlock.
21
22The patch has not yet been integrated upstream.
23
24Upstream-Status: Pending [ Not Author See bugzilla]
25
26Signed-off-by: Raghunath Lolur <Raghunath.Lolur@kpit.com>
27Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
28Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
29Signed-off-by: Khem Raj <raj.khem@gmail.com>
30---
31 sysdeps/nptl/fork.c | 7 +++++++
32 1 file changed, 7 insertions(+)
33
34diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
35index 0f48933ff1..eef3f9669b 100644
36--- a/sysdeps/nptl/fork.c
37+++ b/sysdeps/nptl/fork.c
38@@ -25,6 +25,7 @@
39 #include <tls.h>
40 #include <hp-timing.h>
41 #include <ldsodefs.h>
42+#include <libc-lock.h>
43 #include <stdio-lock.h>
44 #include <atomic.h>
45 #include <nptl/pthreadP.h>
46@@ -56,6 +57,9 @@ __libc_fork (void)
47 bool multiple_threads = THREAD_GETMEM (THREAD_SELF, header.multiple_threads);
48
49 __run_fork_handlers (atfork_run_prepare);
50+ /* grab ld.so lock BEFORE switching to malloc_atfork */
51+ __rtld_lock_lock_recursive (GL(dl_load_lock));
52+ __rtld_lock_lock_recursive (GL(dl_load_write_lock));
53
54 /* If we are not running multiple threads, we do not have to
55 preserve lock state. If fork runs from a signal handler, only
56@@ -150,6 +154,9 @@ __libc_fork (void)
57
58 /* Run the handlers registered for the parent. */
59 __run_fork_handlers (atfork_run_parent);
60+ /* unlock ld.so last, because we locked it first */
61+ __rtld_lock_unlock_recursive (GL(dl_load_write_lock));
62+ __rtld_lock_unlock_recursive (GL(dl_load_lock));
63 }
64
65 return pid;
diff --git a/meta/recipes-core/glibc/glibc_2.28.bb b/meta/recipes-core/glibc/glibc_2.28.bb
index d072939254..72cee04d9a 100644
--- a/meta/recipes-core/glibc/glibc_2.28.bb
+++ b/meta/recipes-core/glibc/glibc_2.28.bb
@@ -40,8 +40,6 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
40 file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \ 40 file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
41 file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \ 41 file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
42 file://0025-locale-fix-hard-coded-reference-to-gcc-E.patch \ 42 file://0025-locale-fix-hard-coded-reference-to-gcc-E.patch \
43 file://0026-reset-dl_load_write_lock-after-forking.patch \
44 file://0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch \
45 file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \ 43 file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
46 file://0029-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \ 44 file://0029-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
47 file://0030-intl-Emit-no-lines-in-bison-generated-files.patch \ 45 file://0030-intl-Emit-no-lines-in-bison-generated-files.patch \