summaryrefslogtreecommitdiffstats
path: root/sys/dev/vnd.c
diff options
context:
space:
mode:
authorpedro <pedro@openbsd.org>2007-02-26 11:25:23 +0000
committerpedro <pedro@openbsd.org>2007-02-26 11:25:23 +0000
commit2c66164667b1fa97db1a16b2431bf991478b449f (patch)
treef8aa75e110a233a0d5700d789d6b876ca3ecf2e7 /sys/dev/vnd.c
parentfix small memleaks (diff)
downloadwireguard-openbsd-2c66164667b1fa97db1a16b2431bf991478b449f.tar.xz
wireguard-openbsd-2c66164667b1fa97db1a16b2431bf991478b449f.zip
Don't enforce RLIMIT_FSIZE on vnd(4) I/O operations, okay deraadt@
Diffstat (limited to 'sys/dev/vnd.c')
-rw-r--r--sys/dev/vnd.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index da2c15b60f4..2e8c3e37640 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.69 2007/02/21 19:25:40 grunk Exp $ */
+/* $OpenBSD: vnd.c,v 1.70 2007/02/26 11:25:23 pedro Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -461,8 +461,12 @@ vndstrategy(struct buf *bp)
vndencrypt(vnd, bp->b_data,
bp->b_bcount, bp->b_blkno, 1);
auio.uio_rw = UIO_WRITE;
- bp->b_error = VOP_WRITE(vnd->sc_vp, &auio, 0,
- vnd->sc_cred);
+ /*
+ * Upper layer has already checked I/O for
+ * limits, so there is no need to do it again.
+ */
+ bp->b_error = VOP_WRITE(vnd->sc_vp, &auio,
+ IO_NOLIMIT, vnd->sc_cred);
/* Data in buffer cache needs to be in clear */
if (vnd->sc_keyctx)
vndencrypt(vnd, bp->b_data,