From: Alan Cox Now we have pushed the lock down we can stop wrapping the call with a lock in the tty layer. Signed-off-by: Alan Cox Signed-off-by: Andrew Morton --- drivers/char/tty_io.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff -puN drivers/char/tty_io.c~tty-drop-the-bkl-for-driver-ldisc-ioctl-methods drivers/char/tty_io.c --- a/drivers/char/tty_io.c~tty-drop-the-bkl-for-driver-ldisc-ioctl-methods +++ a/drivers/char/tty_io.c @@ -3459,11 +3459,8 @@ long tty_ioctl(struct file *file, unsign switch (cmd) { case TIOCSBRK: case TIOCCBRK: - if (tty->driver->ioctl) { - lock_kernel(); + if (tty->driver->ioctl) retval = tty->driver->ioctl(tty, file, cmd, arg); - unlock_kernel(); - } return retval; /* These two ioctl's always return success; even if */ @@ -3584,18 +3581,14 @@ long tty_ioctl(struct file *file, unsign break; } if (tty->driver->ioctl) { - lock_kernel(); retval = (tty->driver->ioctl)(tty, file, cmd, arg); - unlock_kernel(); if (retval != -ENOIOCTLCMD) return retval; } ld = tty_ldisc_ref_wait(tty); retval = -EINVAL; if (ld->ioctl) { - lock_kernel(); retval = ld->ioctl(tty, file, cmd, arg); - unlock_kernel(); if (retval == -ENOIOCTLCMD) retval = -EINVAL; } _