summaryrefslogtreecommitdiffstats
path: root/sys/fs
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/fs
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/fs')
-rw-r--r--sys/fs/procfs/procfs_dbregs.c2
-rw-r--r--sys/fs/procfs/procfs_fpregs.c2
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);
OpenPOWER on IntegriCloud