]> 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, 12 May 2017 14:04:16 +0000 (16:04 +0200)
ChangeLog
sysdeps/nptl/fork.c

index d46d7cb0331ce6a3d3c8f1104a8e6a89bba627cb..ed7db0b1f2bca834e1947d174487847bf3b33fdb 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-05-12  Joseph Myers  <joseph@codesourcery.com>
 
        * sysdeps/unix/sysv/linux/kernel-features.h
index db6d721fce9c61446315683389d11619bb60f737..4bb87e233118586f5d277c16fc67806a5255ab1a 100644 (file)
@@ -131,10 +131,6 @@ __libc_fork (void)
       call_function_static_weak (__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;
@@ -230,8 +224,6 @@ __libc_fork (void)
     }
   else
     {
-      assert (THREAD_GETMEM (THREAD_SELF, tid) == ppid);
-
       /* Release acquired locks in the multi-threaded case.  */
       if (multiple_threads)
        {