patch-1.3.98 linux/drivers/block/ide-cd.c

Next file: linux/drivers/block/ide-tape.c
Previous file: linux/drivers/block/floppy.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.97/linux/drivers/block/ide-cd.c linux/drivers/block/ide-cd.c
@@ -92,6 +92,8 @@
  *                       Reformat to match kernel tabbing style.
  *                       Add CDROM_GET_UPC ioctl.
  * 3.10  Apr 10, 1996 -- Fix compilation error with STANDARD_ATAPI.
+ * 3.11  Apr 29, 1996 -- Patch from Heiko Eissfeldt <heiko@colossus.escape.de>
+ *                       to remove redundant verify_area calls.
  *
  * NOTE: Direct audio reads will only work on some types of drive.
  * So far, i've received reports of success for Sony and Toshiba drives.
@@ -2079,9 +2081,6 @@
 		struct cdrom_tocentry tocentry;
 		struct atapi_toc_entry *toce;
 
-		stat = verify_area (VERIFY_READ, (void *) arg,
-				    sizeof (tocentry));
-		if (stat) return stat;
 		stat = verify_area (VERIFY_WRITE, (void *) arg,
 				    sizeof (tocentry));
 		if (stat) return stat;
@@ -2117,9 +2116,6 @@
 		stat = verify_area (VERIFY_WRITE, (void *) arg,
 				    sizeof (subchnl));
 		if (stat) return stat;
-		stat = verify_area (VERIFY_READ, (void *) arg,
-				    sizeof (subchnl));
-		if (stat) return stat;
 
 		memcpy_fromfs (&subchnl, (void *) arg, sizeof (subchnl));
 
@@ -2228,9 +2224,6 @@
 		struct atapi_toc *toc;
 		int stat;
 
-		stat = verify_area (VERIFY_READ,  (void *)arg,
-				    sizeof (ms_info));
-		if (stat) return stat;
 		stat = verify_area (VERIFY_WRITE, (void *)arg,
 				    sizeof (ms_info));
 		if (stat) return stat;
@@ -2327,8 +2320,6 @@
 			format = 3;
 		}
 
-		stat = verify_area (VERIFY_READ, (char *)arg, sizeof (msf));
-		if (stat) return stat;
 		stat = verify_area (VERIFY_WRITE, (char *)arg, blocksize);
 		if (stat) return stat;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this