summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/os/sig.c
diff options
context:
space:
mode:
authornr123932 <none@none>2007-03-30 01:55:41 -0700
committernr123932 <none@none>2007-03-30 01:55:41 -0700
commit8548bf79039833dba8615afdf63258b2cb122121 (patch)
treec9d7f506296f12858a99b42d94bda969bb1a4ebc /usr/src/uts/common/os/sig.c
parent3a62633b4e364efc25704bee4e40b1107709521e (diff)
downloadillumos-joyent-8548bf79039833dba8615afdf63258b2cb122121.tar.gz
6368753 Need a patch solution to 4522909 automountd hangs with executeable maps
6509943 Apparent deadlock between fork()'s use of lwp_suspend and NFS locking (Backout 4522909)
Diffstat (limited to 'usr/src/uts/common/os/sig.c')
-rw-r--r--usr/src/uts/common/os/sig.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/usr/src/uts/common/os/sig.c b/usr/src/uts/common/os/sig.c
index 5c72fb749b..69c1074816 100644
--- a/usr/src/uts/common/os/sig.c
+++ b/usr/src/uts/common/os/sig.c
@@ -447,10 +447,10 @@ issig_justlooking(void)
if ((lwp->lwp_asleep && MUSTRETURN(p, t)) ||
(p->p_flag & (SEXITLWPS|SKILLED)) ||
- (!lwp->lwp_nostop_r && ((p->p_flag & (SHOLDFORK1|SHOLDWATCH)) |
- (t->t_proc_flag & TP_HOLDLWP))) ||
- (!lwp->lwp_nostop && (p->p_stopsig | (t->t_proc_flag &
- (TP_PRSTOP|TP_CHKPT|TP_PAUSE)))) ||
+ (lwp->lwp_nostop == 0 &&
+ (p->p_stopsig | (p->p_flag & (SHOLDFORK1|SHOLDWATCH)) |
+ (t->t_proc_flag &
+ (TP_PRSTOP|TP_HOLDLWP|TP_CHKPT|TP_PAUSE)))) ||
lwp->lwp_cursig)
return (1);
@@ -588,15 +588,9 @@ issig_forreal(void)
* or is executing lwp_suspend() on this lwp.
* Again, go back to top of loop to check if an exit
* or hold event has occurred while stopped.
- * We explicitly allow this form of stopping of one
- * lwp in a process by another lwp in the same process,
- * even if lwp->lwp_nostop is set, because otherwise a
- * process can become deadlocked on a fork1().
- * Allow this only if lwp_nostop_r is not set,
- * to avoid a recursive call to prstop().
*/
if (((p->p_flag & (SHOLDFORK1|SHOLDWATCH)) ||
- (t->t_proc_flag & TP_HOLDLWP)) && !lwp->lwp_nostop_r) {
+ (t->t_proc_flag & TP_HOLDLWP)) && !lwp->lwp_nostop) {
stop(PR_SUSPENDED, SUSPEND_NORMAL);
continue;
}
@@ -863,11 +857,9 @@ stop(int why, int what)
/*
* Make sure we don't deadlock on a recursive call to prstop().
- * prstop() sets the lwp_nostop_r flag and increments lwp_nostop.
+ * prstop() sets the lwp_nostop flag.
*/
- if (lwp->lwp_nostop_r ||
- (lwp->lwp_nostop &&
- (why != PR_SUSPENDED || what != SUSPEND_NORMAL)))
+ if (lwp->lwp_nostop)
return;
/*