mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
tty: Redo current tty locking
Currently it is sometimes locked by the tty mutex and sometimes by the sighand lock. The latter is in fact correct and now we can hand back referenced objects we can fix this up without problems around sleeping functions. Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
2cb5998b5f
commit
934e6ebf96
4 changed files with 5 additions and 18 deletions
|
|
@ -431,6 +431,7 @@ fs3270_open(struct inode *inode, struct file *filp)
|
|||
tty = get_current_tty();
|
||||
if (!tty || tty->driver->major != IBM_TTY3270_MAJOR) {
|
||||
tty_kref_put(tty);
|
||||
mutex_unlock(&tty_mutex);
|
||||
rc = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue