diff options
author | jhb <jhb@FreeBSD.org> | 2001-01-06 00:08:39 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-01-06 00:08:39 +0000 |
commit | 9615a9759434073fd9f29566eba28fc5c5214bc2 (patch) | |
tree | 99c73446b3b29c64322856ebdc90496602bb0c2d | |
parent | 0ae9ef0acbb0465d33e64d4118d5565c6b339172 (diff) | |
download | FreeBSD-src-9615a9759434073fd9f29566eba28fc5c5214bc2.zip FreeBSD-src-9615a9759434073fd9f29566eba28fc5c5214bc2.tar.gz |
Protect p_nice and P_TRACED in psignal() above the switch statement with
sched_lock.
-rw-r--r-- | sys/kern/kern_sig.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index facce03..29d2b60 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1083,9 +1083,11 @@ psignal(p, sig) action = SIG_DFL; } + mtx_enter(&sched_lock, MTX_SPIN); if (p->p_nice > NZERO && action == SIG_DFL && (prop & SA_KILL) && (p->p_flag & P_TRACED) == 0) p->p_nice = NZERO; + mtx_exit(&sched_lock, MTX_SPIN); if (prop & SA_CONT) SIG_STOPSIGMASK(p->p_siglist); |