diff options
author | jake <jake@FreeBSD.org> | 2000-12-13 09:05:45 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2000-12-13 09:05:45 +0000 |
commit | 4a2d5eea922ec26bff0e157f383534bb29fef23a (patch) | |
tree | 6f0389a245c41ce9fccdb63ce8dd23c9a1c8f538 /sys/compat | |
parent | e8106458122a7d9c0bc172f4519ed204fdc4df14 (diff) | |
download | FreeBSD-src-4a2d5eea922ec26bff0e157f383534bb29fef23a.zip FreeBSD-src-4a2d5eea922ec26bff0e157f383534bb29fef23a.tar.gz |
Lock the allproc list.
Approved by: DES
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linprocfs/linprocfs_vnops.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/compat/linprocfs/linprocfs_vnops.c b/sys/compat/linprocfs/linprocfs_vnops.c index d35247b..fca2cdb 100644 --- a/sys/compat/linprocfs/linprocfs_vnops.c +++ b/sys/compat/linprocfs/linprocfs_vnops.c @@ -840,8 +840,10 @@ linprocfs_readdir(ap) int doingzomb = 0; #endif int pcnt = 0; - struct proc *p = allproc.lh_first; + struct proc *p; + ALLPROC_LOCK(AP_SHARED); + p = allproc.lh_first; for (; p && uio->uio_resid >= delen; i++, pcnt++) { bzero((char *) dp, delen); dp->d_reclen = delen; @@ -933,6 +935,7 @@ linprocfs_readdir(ap) } #endif + ALLPROC_LOCK(AP_RELEASE); break; } |