diff options
author | markj <markj@FreeBSD.org> | 2015-11-08 01:38:56 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2015-11-08 01:38:56 +0000 |
commit | a7bb6eb7206346586b5a68c0fc588334dbdf1854 (patch) | |
tree | bb49368f6a2c64f93c8c74bd02d3172c0b4db5d1 /sys/fs/procfs | |
parent | a110d65fe331434ebd1f81308283a5fe86997bea (diff) | |
download | FreeBSD-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/fs/procfs')
-rw-r--r-- | sys/fs/procfs/procfs_dbregs.c | 2 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_fpregs.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c index de5dc76..1598443 100644 --- a/sys/fs/procfs/procfs_dbregs.c +++ b/sys/fs/procfs/procfs_dbregs.c @@ -98,7 +98,7 @@ procfs_doprocdbregs(PFS_FILL_ARGS) return (0); PROC_LOCK(p); - KASSERT(p->p_lock > 0, ("proc not held")); + PROC_ASSERT_HELD(p); if (p_candebug(td, p) != 0) { PROC_UNLOCK(p); return (EPERM); diff --git a/sys/fs/procfs/procfs_fpregs.c b/sys/fs/procfs/procfs_fpregs.c index c89c8e7..d2f0153 100644 --- a/sys/fs/procfs/procfs_fpregs.c +++ b/sys/fs/procfs/procfs_fpregs.c @@ -92,7 +92,7 @@ procfs_doprocfpregs(PFS_FILL_ARGS) return (0); PROC_LOCK(p); - KASSERT(p->p_lock > 0, ("proc not held")); + PROC_ASSERT_HELD(p); if (p_candebug(td, p)) { PROC_UNLOCK(p); return (EPERM); |