summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/os/fork.c
diff options
context:
space:
mode:
authorhuah <none@none>2006-06-20 07:21:09 -0700
committerhuah <none@none>2006-06-20 07:21:09 -0700
commit1e2e7a75ddb1eedcefa449ce98fd5862749b72ee (patch)
treead714708dbd98bc8311be0ca8034ad20bfef4e8a /usr/src/uts/common/os/fork.c
parent337c098dc32f2c4eaa1d487e47e93352dc954adf (diff)
downloadillumos-joyent-1e2e7a75ddb1eedcefa449ce98fd5862749b72ee.tar.gz
6373298 Integrate support for MMU context ID domains
Diffstat (limited to 'usr/src/uts/common/os/fork.c')
-rw-r--r--usr/src/uts/common/os/fork.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/usr/src/uts/common/os/fork.c b/usr/src/uts/common/os/fork.c
index 8f2fbb13c1..e4056ef222 100644
--- a/usr/src/uts/common/os/fork.c
+++ b/usr/src/uts/common/os/fork.c
@@ -242,11 +242,12 @@ cfork(int isvfork, int isfork1)
while (*orphpp != cp)
orphpp = &(*orphpp)->p_nextorph;
*orphpp = cp->p_nextorph;
- ASSERT(p->p_child == cp);
- p->p_child = cp->p_sibling;
- if (p->p_child) {
- p->p_child->p_psibling = NULL;
- }
+ if (p->p_child == cp)
+ p->p_child = cp->p_sibling;
+ if (cp->p_sibling)
+ cp->p_sibling->p_psibling = cp->p_psibling;
+ if (cp->p_psibling)
+ cp->p_psibling->p_sibling = cp->p_sibling;
mutex_enter(&cp->p_lock);
tk = cp->p_task;
task_detach(cp);
@@ -594,11 +595,12 @@ forklwperr:
while (*orphpp != cp)
orphpp = &(*orphpp)->p_nextorph;
*orphpp = cp->p_nextorph;
- ASSERT(p->p_child == cp);
- p->p_child = cp->p_sibling;
- if (p->p_child) {
- p->p_child->p_psibling = NULL;
- }
+ if (p->p_child == cp)
+ p->p_child = cp->p_sibling;
+ if (cp->p_sibling)
+ cp->p_sibling->p_psibling = cp->p_psibling;
+ if (cp->p_psibling)
+ cp->p_psibling->p_sibling = cp->p_sibling;
pid_exit(cp);
mutex_exit(&pidlock);