patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / drivers / char / pty.c
index 4abc4d9..4cea8c0 100644 (file)
@@ -211,7 +211,7 @@ static int pty_chars_in_buffer(struct tty_struct *tty)
  * one we got after it is open, with an ioctl.
  */
 #ifdef CONFIG_UNIX98_PTYS
-static int pty_get_device_number(struct tty_struct *tty, unsigned int *value)
+static int pty_get_device_number(struct tty_struct *tty, unsigned __user *value)
 {
        unsigned int result = tty->index;
        return put_user(result, value);
@@ -219,7 +219,7 @@ static int pty_get_device_number(struct tty_struct *tty, unsigned int *value)
 #endif
 
 /* Set the lock flag on a pty */
-static int pty_set_lock(struct tty_struct *tty, int * arg)
+static int pty_set_lock(struct tty_struct *tty, int __user * arg)
 {
        int val;
        if (get_user(val,arg))
@@ -241,7 +241,7 @@ static int pty_bsd_ioctl(struct tty_struct *tty, struct file *file,
        }
        switch(cmd) {
        case TIOCSPTLCK: /* Set PT Lock (disallow slave open) */
-               return pty_set_lock(tty, (int *) arg);
+               return pty_set_lock(tty, (int __user *) arg);
        }
        return -ENOIOCTLCMD;
 }
@@ -257,9 +257,9 @@ static int pty_unix98_ioctl(struct tty_struct *tty, struct file *file,
        }
        switch(cmd) {
        case TIOCSPTLCK: /* Set PT Lock (disallow slave open) */
-               return pty_set_lock(tty, (int *)arg);
+               return pty_set_lock(tty, (int __user *)arg);
        case TIOCGPTN: /* Get PT Number */
-               return pty_get_device_number(tty, (unsigned int *)arg);
+               return pty_get_device_number(tty, (unsigned int __user *)arg);
        }
 
        return -ENOIOCTLCMD;