summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs/procfs_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/procfs/procfs_subr.c')
-rw-r--r--sys/fs/procfs/procfs_subr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/procfs/procfs_subr.c b/sys/fs/procfs/procfs_subr.c
index 035eb75..b960b13 100644
--- a/sys/fs/procfs/procfs_subr.c
+++ b/sys/fs/procfs/procfs_subr.c
@@ -252,11 +252,13 @@ procfs_rw(ap)
int rtval;
p = PFIND(pfs->pfs_pid);
- if (p == 0)
+ if (p == NULL)
return (EINVAL);
+ PROC_UNLOCK(p);
if (p->p_pid == 1 && securelevel > 0 && uio->uio_rw == UIO_WRITE)
return (EACCES);
+ mp_fixme("pfs_lockowner needs a lock");
while (pfs->pfs_lockowner) {
tsleep(&pfs->pfs_lockowner, PRIBIO, "pfslck", 0);
}
OpenPOWER on IntegriCloud