Module Name:    src
Committed By:   mlelstv
Date:           Thu Apr  4 12:26:45 UTC 2019

Modified Files:
        src/sys/kern: kern_physio.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/kern/kern_physio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/kern_physio.c
diff -u src/sys/kern/kern_physio.c:1.94 src/sys/kern/kern_physio.c:1.95
--- src/sys/kern/kern_physio.c:1.94	Tue Mar 26 09:33:58 2019
+++ src/sys/kern/kern_physio.c	Thu Apr  4 12:26:45 2019
@@ -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 @@ physio(void (*strategy)(struct buf *), s
 				 */
 				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;

Reply via email to