summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_thr.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-04-17 22:21:57 +0000
committerjhb <jhb@FreeBSD.org>2003-04-17 22:21:57 +0000
commit96015b90e08facc1325dfa510bbe7a265e0118bc (patch)
treefe1491e67e9166459fe18c741883a612388b5b4b /sys/kern/kern_thr.c
parente517678fbb354c13b3fc298c6d2f7cd346c99f83 (diff)
downloadFreeBSD-src-96015b90e08facc1325dfa510bbe7a265e0118bc.zip
FreeBSD-src-96015b90e08facc1325dfa510bbe7a265e0118bc.tar.gz
Protect td_sigmask with the proc lock.
Diffstat (limited to 'sys/kern/kern_thr.c')
-rw-r--r--sys/kern/kern_thr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index c2a2103..488cf6f 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -153,7 +153,9 @@ thr_create(struct thread *td, struct thr_create_args *uap)
(unsigned) RANGEOF(struct thread, td_startcopy, td_endcopy));
td0->td_proc = td->td_proc;
+ PROC_LOCK(td->td_proc);
td0->td_sigmask = td->td_sigmask;
+ PROC_UNLOCK(td->td_proc);
bcopy(td->td_frame, td0->td_frame, sizeof(struct trapframe));
td0->td_ucred = crhold(td->td_ucred);
OpenPOWER on IntegriCloud