diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2001-11-12 18:56:49 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2001-11-12 18:56:49 +0000 |
| commit | 5b29d6e9065503829735e5d07a827ef64743c929 (patch) | |
| tree | 6784b34e0d65d632d9d07c0889679e638d222d5f /sys/kern/kern_prot.c | |
| parent | d9009094398fbdf0e79e8fa16ce715f9f2ab25f7 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_prot.c')
| -rw-r--r-- | sys/kern/kern_prot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 5ffeeb79fc1f..9378d486a62e 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -55,6 +55,7 @@ #include <sys/lock.h> #include <sys/mutex.h> #include <sys/proc.h> +#include <sys/sx.h> #include <sys/sysproto.h> #include <sys/malloc.h> #include <sys/pioctl.h> @@ -443,6 +444,7 @@ setpgid(td, uap) mtx_lock(&Giant); + sx_slock(&proctree_lock); if (uap->pid != 0 && uap->pid != curp->p_pid) { if ((targp = pfind(uap->pid)) == NULL || !inferior(targp)) { if (targp) @@ -488,6 +490,7 @@ setpgid(td, uap) PROC_UNLOCK(targp); error = enterpgrp(targp, uap->pgid, 0); done2: + sx_sunlock(&proctree_lock); mtx_unlock(&Giant); return (error); } |
