aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/imgact_aout.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2002-04-09 20:10:46 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2002-04-09 20:10:46 +0000
commit65c9b4303bf4c69fb4bd795210b7c8d626044730 (patch)
tree888c25fcd0b8d42fbe2dc338809dbb338edc3251 /sys/kern/imgact_aout.c
parentad278afdf0b2f6a2fde871495a124e186a9f70de (diff)
downloadsrc-65c9b4303bf4c69fb4bd795210b7c8d626044730.tar.gz
src-65c9b4303bf4c69fb4bd795210b7c8d626044730.zip
- Change fill_kinfo_proc() to require that the process is locked when it
is called. - Change sysctl_out_proc() to require that the process is locked when it is called and to drop the lock before it returns. If this proves too complex we can change sysctl_out_proc() to simply acquire the lock at the very end and have the calling code drop the lock right after it returns. - Lock the process we are going to export before the p_cansee() in the loop in sysctl_kern_proc() and hold the lock until we call sysctl_out_proc(). - Don't call p_cansee() on the process about to be exported twice in the aforementioned loop.
Notes
Notes: svn path=/head/; revision=94307
Diffstat (limited to 'sys/kern/imgact_aout.c')
-rw-r--r--sys/kern/imgact_aout.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c
index 77d6905bfae7..41ae8cfc0178 100644
--- a/sys/kern/imgact_aout.c
+++ b/sys/kern/imgact_aout.c
@@ -263,7 +263,9 @@ aout_coredump(td, vp, limit)
if (ctob((UAREA_PAGES + KSTACK_PAGES)
+ vm->vm_dsize + vm->vm_ssize) >= limit)
return (EFAULT);
+ PROC_LOCK(p);
fill_kinfo_proc(p, &p->p_uarea->u_kproc);
+ PROC_UNLOCK(p);
error = cpu_coredump(td, vp, cred);
if (error == 0)
error = vn_rdwr(UIO_WRITE, vp, vm->vm_daddr,