diff options
author | das <das@FreeBSD.org> | 2004-10-01 05:01:17 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2004-10-01 05:01:17 +0000 |
commit | 9d2cf40e6309c36b8bd2cf35e45478f451dd1f19 (patch) | |
tree | f12684e02f8b31f99eecd09a02dd46cdeeb0121f /sys/fs/procfs/procfs_regs.c | |
parent | 81fc7cf4858181b5112087c818ade372e1a94828 (diff) | |
download | FreeBSD-src-9d2cf40e6309c36b8bd2cf35e45478f451dd1f19.zip FreeBSD-src-9d2cf40e6309c36b8bd2cf35e45478f451dd1f19.tar.gz |
Don't PHOLD() the target process in procfs, since this is already done
in pseudofs. Moreover, PHOLD() may block between the p_candebug()
access check and the actual operation.
Diffstat (limited to 'sys/fs/procfs/procfs_regs.c')
-rw-r--r-- | sys/fs/procfs/procfs_regs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/fs/procfs/procfs_regs.c b/sys/fs/procfs/procfs_regs.c index a59e9bd..7da0f8c 100644 --- a/sys/fs/procfs/procfs_regs.c +++ b/sys/fs/procfs/procfs_regs.c @@ -57,12 +57,12 @@ procfs_doprocregs(PFS_FILL_ARGS) struct reg r; PROC_LOCK(p); + KASSERT(p->p_lock > 0, ("proc not held")); if (p_candebug(td, p)) { PROC_UNLOCK(p); return (EPERM); } - _PHOLD(p); /* XXXKSE: */ error = proc_read_regs(FIRST_THREAD_IN_PROC(p), &r); if (error == 0) { @@ -77,7 +77,6 @@ procfs_doprocregs(PFS_FILL_ARGS) /* XXXKSE: */ error = proc_write_regs(FIRST_THREAD_IN_PROC(p), &r); } - _PRELE(p); PROC_UNLOCK(p); uio->uio_offset = 0; |