X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fpty.c;h=4cea8c05c81b76306ebc8830f693de6b5766e260;hb=746550cff061581f89c687ada8523670768364f2;hp=4abc4d95b26df54cc63c4cde957aac2a7e2e7fd5;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/drivers/char/pty.c b/drivers/char/pty.c index 4abc4d95b..4cea8c05c 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c @@ -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;