aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2002-05-19 00:14:50 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2002-05-19 00:14:50 +0000
commitf44d9e24fbb396076ebabf326c6f80e166d3d4a5 (patch)
tree0642e3c6447c397fe8442630e46788930550bb42 /sys/fs
parent2bab796d96af8c985c3258e20e5459a7a64d9c6d (diff)
Notes
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/procfs/procfs.c4
-rw-r--r--sys/fs/procfs/procfs_ctl.c4
-rw-r--r--sys/fs/procfs/procfs_dbregs.c2
-rw-r--r--sys/fs/procfs/procfs_fpregs.c2
-rw-r--r--sys/fs/procfs/procfs_mem.c2
-rw-r--r--sys/fs/procfs/procfs_regs.c2
-rw-r--r--sys/fs/procfs/procfs_status.c2
-rw-r--r--sys/fs/pseudofs/pseudofs_vnops.c2
8 files changed, 11 insertions, 9 deletions
diff --git a/sys/fs/procfs/procfs.c b/sys/fs/procfs/procfs.c
index 6d6162eb323b..8083ba687e3e 100644
--- a/sys/fs/procfs/procfs.c
+++ b/sys/fs/procfs/procfs.c
@@ -107,6 +107,7 @@ procfs_attr(PFS_ATTR_ARGS)
vap->va_mode = 0600;
/* p is locked by caller */
+ PROC_LOCK_ASSERT(p, MA_OWNED);
vap->va_uid = p->p_ucred->cr_uid;
vap->va_gid = p->p_ucred->cr_gid;
@@ -130,8 +131,9 @@ procfs_notsystem(PFS_VIS_ARGS)
int
procfs_candebug(PFS_VIS_ARGS)
{
+ PROC_LOCK_ASSERT(p, MA_OWNED);
return ((p->p_flag & P_SYSTEM) == 0 &&
- p_candebug(td->td_proc, p) == 0);
+ p_candebug(td, p) == 0);
}
/*
diff --git a/sys/fs/procfs/procfs_ctl.c b/sys/fs/procfs/procfs_ctl.c
index cf8cbc7cc892..0f353706b847 100644
--- a/sys/fs/procfs/procfs_ctl.c
+++ b/sys/fs/procfs/procfs_ctl.c
@@ -122,7 +122,7 @@ procfs_control(struct thread *td, struct proc *p, int op)
if (op == PROCFS_CTL_ATTACH) {
sx_xlock(&proctree_lock);
PROC_LOCK(p);
- if ((error = p_candebug(td->td_proc, p)) != 0)
+ if ((error = p_candebug(td, p)) != 0)
goto out;
if (p->p_flag & P_TRACED) {
error = EBUSY;
@@ -165,7 +165,7 @@ out:
*/
PROC_LOCK(p);
if (op != PROCFS_CTL_DETACH &&
- ((error = p_candebug(td->td_proc, p)))) {
+ ((error = p_candebug(td, p)))) {
PROC_UNLOCK(p);
return (error);
}
diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c
index 29ff71ba70e2..361f34baf6ae 100644
--- a/sys/fs/procfs/procfs_dbregs.c
+++ b/sys/fs/procfs/procfs_dbregs.c
@@ -69,7 +69,7 @@ procfs_doprocdbregs(PFS_FILL_ARGS)
int kl;
PROC_LOCK(p);
- if (p_candebug(td->td_proc, p) != 0) {
+ 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 caabe49523e9..afabb33a97b1 100644
--- a/sys/fs/procfs/procfs_fpregs.c
+++ b/sys/fs/procfs/procfs_fpregs.c
@@ -63,7 +63,7 @@ procfs_doprocfpregs(PFS_FILL_ARGS)
int kl;
PROC_LOCK(p);
- if (p_candebug(td->td_proc, p)) {
+ if (p_candebug(td, p)) {
PROC_UNLOCK(p);
return (EPERM);
}
diff --git a/sys/fs/procfs/procfs_mem.c b/sys/fs/procfs/procfs_mem.c
index 1f92373d37d3..5c086bee3c5c 100644
--- a/sys/fs/procfs/procfs_mem.c
+++ b/sys/fs/procfs/procfs_mem.c
@@ -66,7 +66,7 @@ procfs_doprocmem(PFS_FILL_ARGS)
return (0);
PROC_LOCK(p);
- error = p_candebug(td->td_proc, p);
+ error = p_candebug(td, p);
PROC_UNLOCK(p);
if (error == 0)
error = proc_rwmem(p, uio);
diff --git a/sys/fs/procfs/procfs_regs.c b/sys/fs/procfs/procfs_regs.c
index 3c0a700023b5..5fcb450a0def 100644
--- a/sys/fs/procfs/procfs_regs.c
+++ b/sys/fs/procfs/procfs_regs.c
@@ -63,7 +63,7 @@ procfs_doprocregs(PFS_FILL_ARGS)
int kl;
PROC_LOCK(p);
- if (p_candebug(td->td_proc, p)) {
+ if (p_candebug(td, p)) {
PROC_UNLOCK(p);
return (EPERM);
}
diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c
index b03f4dc56fe5..6e5711b0fe2b 100644
--- a/sys/fs/procfs/procfs_status.c
+++ b/sys/fs/procfs/procfs_status.c
@@ -182,7 +182,7 @@ procfs_doproccmdline(PFS_FILL_ARGS)
*/
PROC_LOCK(p);
- if (p->p_args && (ps_argsopen || !p_cansee(td->td_proc, p))) {
+ if (p->p_args && (ps_argsopen || !p_cansee(td, p))) {
sbuf_bcpy(sb, p->p_args->ar_args, p->p_args->ar_length);
PROC_UNLOCK(p);
return (0);
diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c
index e1541f920f2a..ac49ca0a653d 100644
--- a/sys/fs/pseudofs/pseudofs_vnops.c
+++ b/sys/fs/pseudofs/pseudofs_vnops.c
@@ -86,7 +86,7 @@ pfs_visible(struct thread *td, struct pfs_node *pn, pid_t pid)
if (pid != NO_PID) {
if ((proc = pfind(pid)) == NULL)
PFS_RETURN (0);
- if (p_cansee(td->td_proc, proc) != 0 ||
+ if (p_cansee(td, proc) != 0 ||
(pn->pn_vis != NULL && !(pn->pn_vis)(td, proc, pn)))
r = 0;
PROC_UNLOCK(proc);