From a7bb6eb7206346586b5a68c0fc588334dbdf1854 Mon Sep 17 00:00:00 2001 From: markj Date: Sun, 8 Nov 2015 01:38:56 +0000 Subject: - 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 --- sys/kern/sys_process.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sys/kern/sys_process.c') 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... -- cgit v1.1