diff options
author | jhb <jhb@FreeBSD.org> | 2002-04-13 23:15:28 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-04-13 23:15:28 +0000 |
commit | f430ba9802432a5e9145a5b81b8116282a556a12 (patch) | |
tree | a85d7c4dbe1dceb07d87a4c56b44c57ef8c3c9db /sys/fs/procfs/procfs_mem.c | |
parent | 04f22cf81107fa960152dc835a2290c72cf93264 (diff) | |
download | FreeBSD-src-f430ba9802432a5e9145a5b81b8116282a556a12.zip FreeBSD-src-f430ba9802432a5e9145a5b81b8116282a556a12.tar.gz |
Lock the target process for p_candebug().
Diffstat (limited to 'sys/fs/procfs/procfs_mem.c')
-rw-r--r-- | sys/fs/procfs/procfs_mem.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/fs/procfs/procfs_mem.c b/sys/fs/procfs/procfs_mem.c index 5e51cab..09d02de 100644 --- a/sys/fs/procfs/procfs_mem.c +++ b/sys/fs/procfs/procfs_mem.c @@ -64,10 +64,11 @@ procfs_doprocmem(PFS_FILL_ARGS) if (uio->uio_resid == 0) return (0); + PROC_LOCK(p); error = p_candebug(td->td_proc, p); - if (error) - return (error); - error = proc_rwmem(p, uio); + PROC_UNLOCK(p); + if (error == 0) + error = proc_rwmem(p, uio); return (error); } |