]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
fork: Remove bogus parent PID assertions [BZ #21386]
authorFlorian Weimer <fweimer@redhat.com>
Fri, 12 May 2017 09:58:09 +0000 (11:58 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 9 Jun 2017 10:00:48 +0000 (12:00 +0200)
(cherry picked from commit 1d2bc2eae969543b89850e35e532f3144122d80a)

ChangeLog
NEWS
sysdeps/nptl/fork.c

index 33d05e48789b51c9cb43fbc7dc6c664ea6faa3d0..3d4f5f83502a9b796d862055670e7d84ed3dc20c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-05-12  Florian Weimer  <fweimer@redhat.com>
+
+       [BZ #21386]
+       * sysdeps/nptl/fork.c (__libc_fork): Remove assertions on the
+       parent PID.  The assertion in the child is incorrect with PID
+       namespaces.
+
 2017-06-07  Arjun Shankar  <arjun.is@lostca.se>
 
        * sysdeps/unix/sysv/linux/tst-clone2.c: Do not
diff --git a/NEWS b/NEWS
index 71b41ea6255f2c8f12d9531afec94f073c7dee04..82a718ff64ab849ba6929ff9af35b65fb84bbb94 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,7 @@ Security related changes:
 The following bugs are resolved with this release:
 
   [21289] Fix symbol redirect for fts_set
+  [21386] Assertion in fork for distinct parent PID is incorrect
 \f
 Version 2.24
 
index 02ff793ae74ebadec5f02948a46495f50450b3d9..a5d1e86d71d99b0e1d9a9b52214dc176365ee839 100644 (file)
@@ -131,10 +131,6 @@ __libc_fork (void)
       __malloc_fork_lock_parent ();
     }
 
-#ifndef NDEBUG
-  pid_t ppid = THREAD_GETMEM (THREAD_SELF, tid);
-#endif
-
 #ifdef ARCH_FORK
   pid = ARCH_FORK ();
 #else
@@ -147,8 +143,6 @@ __libc_fork (void)
     {
       struct pthread *self = THREAD_SELF;
 
-      assert (THREAD_GETMEM (self, tid) != ppid);
-
       /* See __pthread_once.  */
       if (__fork_generation_pointer != NULL)
        *__fork_generation_pointer += __PTHREAD_ONCE_FORK_GEN_INCR;
@@ -222,8 +216,6 @@ __libc_fork (void)
     }
   else
     {
-      assert (THREAD_GETMEM (THREAD_SELF, tid) == ppid);
-
       /* Release acquired locks in the multi-threaded case.  */
       if (multiple_threads)
        {