Author: sthibault
Date: 2014-08-27 22:56:50 +0000 (Wed, 27 Aug 2014)
New Revision: 6260

Added:
   glibc-package/trunk/debian/patches/hurd-i386/tg-fork_ss_hang.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
patches/hurd-i386/tg-fork_ss_hang.diff: New patch which fixes some dash hangs.


Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2014-08-27 22:56:00 UTC (rev 
6259)
+++ glibc-package/trunk/debian/changelog        2014-08-27 22:56:50 UTC (rev 
6260)
@@ -5,6 +5,8 @@
     overzealous assertions.
   * patches/hurd-i386/submitted-bind_umask.diff: Split into cvs-bind_umask.diff
     and submitted-bind_umask2.diff as requested by upstream.
+  * patches/hurd-i386/tg-fork_ss_hang.diff: New patch which fixes some dash
+    hangs.
 
  -- Aurelien Jarno <aure...@debian.org>  Wed, 27 Aug 2014 08:22:41 +0200
 

Added: glibc-package/trunk/debian/patches/hurd-i386/tg-fork_ss_hang.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/tg-fork_ss_hang.diff           
                (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/tg-fork_ss_hang.diff   
2014-08-27 22:56:50 UTC (rev 6260)
@@ -0,0 +1,31 @@
+From: Samuel Thibault <samuel.thiba...@ens-lyon.org>
+Subject: [PATCH] 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.thiba...@ens-lyon.org>
+
+---
+ sysdeps/mach/hurd/fork.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/sysdeps/mach/hurd/fork.c
++++ b/sysdeps/mach/hurd/fork.c
+@@ -130,9 +130,13 @@ __fork (void)
+       ports_locked = 1;
+ 
+ 
++      /* Keep our SS locked while stopping other threads, so they don't get a
++       * chance to be having 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;

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series   2014-08-27 22:56:00 UTC (rev 
6259)
+++ glibc-package/trunk/debian/patches/series   2014-08-27 22:56:50 UTC (rev 
6260)
@@ -151,6 +151,7 @@
 hurd-i386/cvs-libpthread_std_thread.diff
 hurd-i386/cvs-bind_umask.diff
 hurd-i386/submitted-bind_umask2.diff
+hurd-i386/tg-fork_ss_hang.diff
 
 i386/local-biarch.diff
 i386/local-cmov.diff


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/e1xmm94-00041e...@moszumanska.debian.org

Reply via email to