summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/0026-reset-dl_load_write_lock-after-forking.patch
blob: 70696b8d3c510549b1f11218060585b777cde9f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From e6e6e5011611fa22186508a3ff8ed4215a529f1f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 27 Jan 2018 10:05:07 -0800
Subject: [PATCH 26/30] reset dl_load_write_lock after forking

The patch in this Bugzilla entry was requested by a customer:

  https://www.sourceware.org/bugzilla/show_bug.cgi?id=19282

The __libc_fork() code reset dl_load_lock, but it also needed to reset
dl_load_write_lock.  The patch has not yet been integrated upstream.

Upstream-Status: Pending [ No Author See bugzilla]

Signed-off-by: Damodar Sonone <damodar.sonone@kpit.com>
Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 sysdeps/nptl/fork.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sysdeps/nptl/fork.c b/sysdeps/nptl/fork.c
index bd68f18b45..5c9bb44372 100644
--- a/sysdeps/nptl/fork.c
+++ b/sysdeps/nptl/fork.c
@@ -130,9 +130,9 @@ __libc_fork (void)
 	  _IO_list_resetlock ();
 	}
 
-      /* Reset the lock the dynamic loader uses to protect its data.  */
+      /* Reset the locks the dynamic loader uses to protect its data.  */
       __rtld_lock_initialize (GL(dl_load_lock));
-
+      __rtld_lock_initialize (GL(dl_load_write_lock));
       /* Run the handlers registered for the child.  */
       __run_fork_handlers (atfork_run_child);
     }
-- 
2.20.1