Skip to content

Commit 1d2bc2e

Browse files
committed
fork: Remove bogus parent PID assertions [BZ #21386]
1 parent e8f1225 commit 1d2bc2e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2017-05-12 Florian Weimer <[email protected]>
2+
3+
[BZ #21386]
4+
* sysdeps/nptl/fork.c (__libc_fork): Remove assertions on the
5+
parent PID. The assertion in the child is incorrect with PID
6+
namespaces.
7+
18
2017-05-12 Joseph Myers <[email protected]>
29

310
* sysdeps/unix/sysv/linux/kernel-features.h

sysdeps/nptl/fork.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,6 @@ __libc_fork (void)
131131
call_function_static_weak (__malloc_fork_lock_parent);
132132
}
133133

134-
#ifndef NDEBUG
135-
pid_t ppid = THREAD_GETMEM (THREAD_SELF, tid);
136-
#endif
137-
138134
#ifdef ARCH_FORK
139135
pid = ARCH_FORK ();
140136
#else
@@ -147,8 +143,6 @@ __libc_fork (void)
147143
{
148144
struct pthread *self = THREAD_SELF;
149145

150-
assert (THREAD_GETMEM (self, tid) != ppid);
151-
152146
/* See __pthread_once. */
153147
if (__fork_generation_pointer != NULL)
154148
*__fork_generation_pointer += __PTHREAD_ONCE_FORK_GEN_INCR;
@@ -230,8 +224,6 @@ __libc_fork (void)
230224
}
231225
else
232226
{
233-
assert (THREAD_GETMEM (THREAD_SELF, tid) == ppid);
234-
235227
/* Release acquired locks in the multi-threaded case. */
236228
if (multiple_threads)
237229
{

0 commit comments

Comments
 (0)