mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-22 21:36:13 +00:00
TTY fixes for 3.10-rc7
Here are two tty core fixes that resolve some regressions that have been reported recently. Both tiny fixes, but needed. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEABECAAYFAlHFtMUACgkQMUfUDdst+yn7IwCfaUgbuu7fzLLhNm8faXgptLhF BhsAoLjaWndDUDCoo5er3OgF27V2z7ec =Slk/ -----END PGP SIGNATURE----- Merge tag 'tty-3.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pul tty fixes from Greg Kroah-Hartman: "Here are two tty core fixes that resolve some regressions that have been reported recently. Both tiny fixes, but needed" * tag 'tty-3.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: Fix transient pty write() EIO tty/vt: Return EBUSY if deallocating VT1 and it is busy
This commit is contained in:
commit
dcfdc28f30
@ -244,14 +244,9 @@ static void pty_flush_buffer(struct tty_struct *tty)
|
|||||||
|
|
||||||
static int pty_open(struct tty_struct *tty, struct file *filp)
|
static int pty_open(struct tty_struct *tty, struct file *filp)
|
||||||
{
|
{
|
||||||
int retval = -ENODEV;
|
|
||||||
|
|
||||||
if (!tty || !tty->link)
|
if (!tty || !tty->link)
|
||||||
goto out;
|
return -ENODEV;
|
||||||
|
|
||||||
set_bit(TTY_IO_ERROR, &tty->flags);
|
|
||||||
|
|
||||||
retval = -EIO;
|
|
||||||
if (test_bit(TTY_OTHER_CLOSED, &tty->flags))
|
if (test_bit(TTY_OTHER_CLOSED, &tty->flags))
|
||||||
goto out;
|
goto out;
|
||||||
if (test_bit(TTY_PTY_LOCK, &tty->link->flags))
|
if (test_bit(TTY_PTY_LOCK, &tty->link->flags))
|
||||||
@ -262,9 +257,11 @@ static int pty_open(struct tty_struct *tty, struct file *filp)
|
|||||||
clear_bit(TTY_IO_ERROR, &tty->flags);
|
clear_bit(TTY_IO_ERROR, &tty->flags);
|
||||||
clear_bit(TTY_OTHER_CLOSED, &tty->link->flags);
|
clear_bit(TTY_OTHER_CLOSED, &tty->link->flags);
|
||||||
set_bit(TTY_THROTTLED, &tty->flags);
|
set_bit(TTY_THROTTLED, &tty->flags);
|
||||||
retval = 0;
|
return 0;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
return retval;
|
set_bit(TTY_IO_ERROR, &tty->flags);
|
||||||
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pty_set_termios(struct tty_struct *tty,
|
static void pty_set_termios(struct tty_struct *tty,
|
||||||
|
@ -289,13 +289,10 @@ static int vt_disallocate(unsigned int vc_num)
|
|||||||
struct vc_data *vc = NULL;
|
struct vc_data *vc = NULL;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (!vc_num)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
console_lock();
|
console_lock();
|
||||||
if (VT_BUSY(vc_num))
|
if (VT_BUSY(vc_num))
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
else
|
else if (vc_num)
|
||||||
vc = vc_deallocate(vc_num);
|
vc = vc_deallocate(vc_num);
|
||||||
console_unlock();
|
console_unlock();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user