diff options
author | jhb <jhb@FreeBSD.org> | 2001-05-15 23:13:58 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-05-15 23:13:58 +0000 |
commit | 36dcd7aa2fee5c973cc58fcbd508631d333fb4aa (patch) | |
tree | c3ecf22fbb19de3650ce7d691f70ca4ab9a0c1c2 /sys/kern/kern_sig.c | |
parent | b5845858e63130ea0deceb47fe1edf06c9ffd3fe (diff) | |
download | FreeBSD-src-36dcd7aa2fee5c973cc58fcbd508631d333fb4aa.zip FreeBSD-src-36dcd7aa2fee5c973cc58fcbd508631d333fb4aa.tar.gz |
- Remove unneeded include of sys/ipl.h.
- Require the proc lock be held for killproc() to allow for the vmdaemon to
kill a process when memory is exhausted while holding the lock of the
process to kill.
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r-- | sys/kern/kern_sig.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 55da023..56837f4 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -54,7 +54,6 @@ #include <sys/pioctl.h> #include <sys/acct.h> #include <sys/fcntl.h> -#include <sys/ipl.h> #include <sys/condvar.h> #include <sys/lock.h> #include <sys/mutex.h> @@ -1608,13 +1607,13 @@ killproc(p, why) struct proc *p; char *why; { + + PROC_LOCK_ASSERT(p, MA_OWNED); CTR3(KTR_PROC, "killproc: proc %p (pid %d, %s)", p, p->p_pid, p->p_comm); log(LOG_ERR, "pid %d (%s), uid %d, was killed: %s\n", p->p_pid, p->p_comm, p->p_cred && p->p_ucred ? p->p_ucred->cr_uid : -1, why); - PROC_LOCK(p); psignal(p, SIGKILL); - PROC_UNLOCK(p); } /* |