summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-03-07 03:37:06 +0000
committerjhb <jhb@FreeBSD.org>2001-03-07 03:37:06 +0000
commit9cd254601baefc2dc9c953abe9747717374ff8b1 (patch)
treeac4298224e8af28e8b2f904a43a2925c21dfc798 /sys/fs
parentace71d59bf35fa6d911520ec855d0100773422a8 (diff)
downloadFreeBSD-src-9cd254601baefc2dc9c953abe9747717374ff8b1.zip
FreeBSD-src-9cd254601baefc2dc9c953abe9747717374ff8b1.tar.gz
Grab the process lock while calling psignal and before calling psignal.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/msdosfs/msdosfs_vnops.c2
-rw-r--r--sys/fs/nwfs/nwfs_io.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c
index fb7b83d..8ed27a0 100644
--- a/sys/fs/msdosfs/msdosfs_vnops.c
+++ b/sys/fs/msdosfs/msdosfs_vnops.c
@@ -654,7 +654,9 @@ msdosfs_write(ap)
if (p &&
((uoff_t)uio->uio_offset + uio->uio_resid >
p->p_rlimit[RLIMIT_FSIZE].rlim_cur)) {
+ PROC_LOCK(p);
psignal(p, SIGXFSZ);
+ PROC_UNLOCK(p);
return (EFBIG);
}
diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c
index 116b0d9..f6344e0 100644
--- a/sys/fs/nwfs/nwfs_io.c
+++ b/sys/fs/nwfs/nwfs_io.c
@@ -237,7 +237,9 @@ nwfs_writevnode(vp, uiop, cred, ioflag)
}
if (uiop->uio_resid == 0) return 0;
if (p && uiop->uio_offset + uiop->uio_resid > p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
+ PROC_LOCK(p);
psignal(p, SIGXFSZ);
+ PROC_UNLOCK(p);
return (EFBIG);
}
error = ncp_write(NWFSTOCONN(nmp), &np->n_fh, uiop, cred);
OpenPOWER on IntegriCloud