summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-03-07 03:26:39 +0000
committerjhb <jhb@FreeBSD.org>2001-03-07 03:26:39 +0000
commit4d5490f460ff68a38d6d1a0782b8a8819b421558 (patch)
tree0f8fd2ab8021f05a6aceeaed7ff524400b49d1bd
parent41113a8cdf079a75ba8c9357342658c86e7a733c (diff)
downloadFreeBSD-src-4d5490f460ff68a38d6d1a0782b8a8819b421558.zip
FreeBSD-src-4d5490f460ff68a38d6d1a0782b8a8819b421558.tar.gz
Use the proc lock to protect access to p_sigacts->ps_sigintr.
-rw-r--r--sys/kern/kern_condvar.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_condvar.c b/sys/kern/kern_condvar.c
index fa3df00..176701d 100644
--- a/sys/kern/kern_condvar.c
+++ b/sys/kern/kern_condvar.c
@@ -274,16 +274,16 @@ cv_wait_sig(struct cv *cvp, struct mtx *mp)
mtx_unlock_spin(&sched_lock);
PICKUP_GIANT();
- /* proc_lock(p); */
if (sig == 0)
sig = CURSIG(p);
if (sig != 0) {
+ PROC_LOCK(p);
if (SIGISMEMBER(p->p_sigacts->ps_sigintr, sig))
rval = EINTR;
else
rval = ERESTART;
+ PROC_UNLOCK(p);
}
- /* proc_unlock(p); */
#ifdef KTRACE
if (KTRPOINT(p, KTR_CSW))
@@ -408,16 +408,16 @@ cv_timedwait_sig(struct cv *cvp, struct mtx *mp, int timo)
mtx_unlock_spin(&sched_lock);
PICKUP_GIANT();
- /* proc_lock(p); */
if (sig == 0)
sig = CURSIG(p);
if (sig != 0) {
+ PROC_LOCK(p);
if (SIGISMEMBER(p->p_sigacts->ps_sigintr, sig))
rval = EINTR;
else
rval = ERESTART;
+ PROC_UNLOCK(p);
}
- /* proc_unlock(p); */
#ifdef KTRACE
if (KTRPOINT(p, KTR_CSW))
OpenPOWER on IntegriCloud