* [PATCH] tty: drop the BKL for driver/ldisc ioctl methods
@ 2008-03-26 11:38 Alan Cox
0 siblings, 0 replies; only message in thread
From: Alan Cox @ 2008-03-26 11:38 UTC (permalink / raw)
To: akpm, linux-kernel
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 <alan@redhat.com>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.25-rc5-mm1/drivers/char/tty_io.c linux-2.6.25-rc5-mm1/drivers/char/tty_io.c
--- linux.vanilla-2.6.25-rc5-mm1/drivers/char/tty_io.c 2008-03-18 15:52:20.000000000 +0000
+++ linux-2.6.25-rc5-mm1/drivers/char/tty_io.c 2008-03-18 15:58:26.000000000 +0000
@@ -3459,11 +3582,8 @@
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 +3704,14 @@
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-26 11:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-26 11:38 [PATCH] tty: drop the BKL for driver/ldisc ioctl methods Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox