patch-1.3.73 linux/fs/ioctl.c

Next file: linux/fs/minix/bitmap.c
Previous file: linux/fs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.72/linux/fs/ioctl.c linux/fs/ioctl.c
@@ -72,6 +72,10 @@
 			return 0;
 
 		case FIONBIO:
+			on = verify_area(VERIFY_READ, (unsigned int *)arg,
+				sizeof(unsigned int));
+			if(on)	
+				return on;
 			on = get_user((unsigned int *) arg);
 			if (on)
 				filp->f_flags |= O_NONBLOCK;
@@ -81,6 +85,10 @@
 
 		case FIOASYNC: /* O_SYNC is not yet implemented,
 				  but it's here for completeness. */
+			on = verify_area(VERIFY_READ, (unsigned int *)arg,
+				sizeof(unsigned int));
+			if(on)	
+				return on;
 			on = get_user ((unsigned int *) arg);
 			if (on)
 				filp->f_flags |= O_SYNC;

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