Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Don't validate buffer size for tape I/O, this is al...
details: https://anonhg.NetBSD.org/src/rev/afa839217be8
branches: trunk
changeset: 997978:afa839217be8
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Thu Apr 04 12:26:45 2019 +0000
description:
Don't validate buffer size for tape I/O, this is already done by
the tape driver. Using MAXBSIZE as limit was also wrong on sun2 where
MAXBSIZE < MAXPHYS.
diffstat:
sys/kern/kern_physio.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diffs (32 lines):
diff -r 4aa2d25e06bb -r afa839217be8 sys/kern/kern_physio.c
--- a/sys/kern/kern_physio.c Thu Apr 04 11:49:06 2019 +0000
+++ b/sys/kern/kern_physio.c Thu Apr 04 12:26:45 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_physio.c,v 1.94 2019/03/26 09:33:58 mlelstv Exp $ */
+/* $NetBSD: kern_physio.c,v 1.95 2019/04/04 12:26:45 mlelstv Exp $ */
/*-
* Copyright (c) 1982, 1986, 1990, 1993
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_physio.c,v 1.94 2019/03/26 09:33:58 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_physio.c,v 1.95 2019/04/04 12:26:45 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -317,13 +317,6 @@
*/
bp->b_bcount = MIN(MAXPHYS, iovp->iov_len);
} else {
- /*
- * Verify that buffer can handle size
- */
- if (iovp->iov_len > MAXBSIZE) {
- error = EINVAL;
- goto done;
- }
bp->b_bcount = iovp->iov_len;
}
bp->b_data = iovp->iov_base;
Home |
Main Index |
Thread Index |
Old Index