summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2015-11-08 01:38:56 +0000
committermarkj <markj@FreeBSD.org>2015-11-08 01:38:56 +0000
commita7bb6eb7206346586b5a68c0fc588334dbdf1854 (patch)
treebb49368f6a2c64f93c8c74bd02d3172c0b4db5d1 /sys/kern
parenta110d65fe331434ebd1f81308283a5fe86997bea (diff)
downloadFreeBSD-src-a7bb6eb7206346586b5a68c0fc588334dbdf1854.zip
FreeBSD-src-a7bb6eb7206346586b5a68c0fc588334dbdf1854.tar.gz
- Consistently use PROC_ASSERT_HELD() to verify that a process' hold count
is non-zero. - Include the process address in the PROC_ASSERT_HELD() and PROC_ASSERT_NOT_HELD() assertion messages so that the corresponding process can be found easily when debugging. MFC after: 1 week
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/sys_process.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
index 47fbbc1..8976941 100644
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -251,8 +251,7 @@ proc_rwmem(struct proc *p, struct uio *uio)
* curthread but we can't assert that.) This keeps the process
* from exiting out from under us until this operation completes.
*/
- KASSERT(p->p_lock >= 1, ("%s: process %p (pid %d) not held", __func__,
- p, p->p_pid));
+ PROC_ASSERT_HELD(p);
/*
* The map we want...
OpenPOWER on IntegriCloud