patch-1.3.4 linux/drivers/char/tty_ioctl.c

Next file: linux/drivers/char/vc_screen.c
Previous file: linux/drivers/char/tty_io.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.3/linux/drivers/char/tty_ioctl.c linux/drivers/char/tty_ioctl.c
@@ -300,14 +300,14 @@
 			return 0;
 		case TIOCOUTQ:
 			retval = verify_area(VERIFY_WRITE, (void *) arg,
-					     sizeof (unsigned long));
+					     sizeof (int));
 			if (retval)
 				return retval;
 			if (tty->driver.chars_in_buffer)
-				put_fs_long(tty->driver.chars_in_buffer(tty),
-					    (unsigned long *) arg);
+				put_user(tty->driver.chars_in_buffer(tty),
+					 (int *) arg);
 			else
-				put_fs_long(0, (unsigned long *) arg);
+				put_user(0, (int *) arg);
 			return 0;
 		case TIOCINQ:
 			retval = verify_area(VERIFY_WRITE, (void *) arg,
@@ -346,10 +346,10 @@
 			    tty->driver.subtype != PTY_TYPE_MASTER)
 				return -ENOTTY;
 			retval = verify_area(VERIFY_READ, (void *) arg,
-					     sizeof (unsigned long));
+					     sizeof (int));
 			if (retval)
 				return retval;
-			if (get_fs_long(arg)) {
+			if (get_user((int*)arg)) {
 				if (!tty->packet) {
 					tty->packet = 1;
 					tty->link->ctrl_status = 0;

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