GNU C Library master sources branch master updated. glibc-2.19-904-g17a62de
sthibaul@sourceware.org
sthibaul@sourceware.org
Thu Aug 28 20:11:00 GMT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 17a62de1ff4c7548748a8d264382131f523f071a (commit)
from 9570bc53fcc11d3cfe028989e611266e8d55bd09 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=17a62de1ff4c7548748a8d264382131f523f071a
commit 17a62de1ff4c7548748a8d264382131f523f071a
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Thu Aug 28 22:08:39 2014 +0200
Fix hang on fork
If e.g. a signal is being received while we are running fork(), the signal
thread may be having our SS lock when we make the space copy, and thus in the
child we can not take the SS lock any more.
* sysdeps/mach/hurd/fork.c (__fork): Lock SS->lock around __proc_dostop call.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
diff --git a/ChangeLog b/ChangeLog
index 23c900d..eb604b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-28 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * sysdeps/mach/hurd/fork.c (__fork): Lock SS->lock around
+ __proc_dostop call.
+
2014-08-27 Mark Wielaard <mjw@redhat.com>
[BZ #17319]
diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c
index 60c34c7..51bc2c0 100644
--- a/sysdeps/mach/hurd/fork.c
+++ b/sysdeps/mach/hurd/fork.c
@@ -129,9 +129,13 @@ __fork (void)
ports_locked = 1;
+ /* Keep our SS locked while stopping other threads, so they don't get a
+ chance to have it locked in the copied space. */
+ __spin_lock (&ss->lock);
/* Stop all other threads while copying the address space,
so nothing changes. */
err = __proc_dostop (_hurd_ports[INIT_PORT_PROC].port, ss->thread);
+ __spin_unlock (&ss->lock);
if (!err)
{
stopped = 1;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
sysdeps/mach/hurd/fork.c | 4 ++++
2 files changed, 9 insertions(+), 0 deletions(-)
hooks/post-receive
--
GNU C Library master sources
More information about the Glibc-cvs
mailing list