vserver 2.0 rc7
[linux-2.6.git] / drivers / s390 / net / ctctty.c
index a4fda34..3080393 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ctctty.c,v 1.26 2004/08/04 11:06:55 mschwide Exp $
+ * $Id: ctctty.c,v 1.29 2005/04/05 08:50:44 mschwide Exp $
  *
  * CTC / ESCON network driver, tty interface.
  *
@@ -778,11 +778,10 @@ ctc_tty_ioctl(struct tty_struct *tty, struct file *file,
                        printk(KERN_DEBUG "%s%d ioctl TIOCSERGETLSR\n", CTC_TTY_NAME,
                               info->line);
 #endif
-                       error = verify_area(VERIFY_WRITE, (void __user *) arg, sizeof(uint));
-                       if (error)
-                               return error;
-                       else
+                       if (access_ok(VERIFY_WRITE, (void __user *) arg, sizeof(uint)))
                                return ctc_tty_get_lsr_info(info, (uint __user *) arg);
+                       else
+                               return -EFAULT;
                default:
 #ifdef CTC_DEBUG_MODEM_IOCTL
                        printk(KERN_DEBUG "UNKNOWN ioctl 0x%08x on %s%d\n", cmd,
@@ -1057,8 +1056,7 @@ ctc_tty_close(struct tty_struct *tty, struct file *filp)
        info->tty = 0;
        tty->closing = 0;
        if (info->blocked_open) {
-               set_current_state(TASK_INTERRUPTIBLE);
-               schedule_timeout(HZ/2);
+               msleep_interruptible(500);
                wake_up_interruptible(&info->open_wait);
        }
        info->flags &= ~(CTC_ASYNC_NORMAL_ACTIVE | CTC_ASYNC_CLOSING);