diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2021-09-03 09:50:28 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2021-09-03 09:50:28 +0200 |
commit | 3f066f394dfbaa992235d8c987ded95f7bcd981f (patch) | |
tree | 97a1f80b0519c996d8fac72149bfd562b3113d6b /drivers/tty | |
parent | d1ac4a20df8c642b1762f15a87446860ecd79fd7 (diff) | |
parent | cbc3014d0d917ba60a8ca3938316ef022ef11f8a (diff) |
Merge 4.4.283 into android-4.4-p
Changes in 4.4.283
can: usb: esd_usb2: esd_usb2_rx_event(): fix the interchange of the CAN RX and TX error counters
Revert "USB: serial: ch341: fix character loss at high transfer rates"
USB: serial: option: add new VID/PID to support Fibocom FG150
e1000e: Fix the max snoop/no-snoop latency for 10M
net: marvell: fix MVNETA_TX_IN_PRGRS bit number
virtio: Improve vq->broken access to avoid any compiler optimization
vringh: Use wiov->used to check for read/write desc order
vt_kdsetmode: extend console locking
fbmem: add margin check to fb_check_caps()
Revert "floppy: reintroduce O_NDELAY fix"
Linux 4.4.283
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I327e81b91a74a7dff9e1cfb71a7d833ff5f034ff
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/vt/vt_ioctl.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index e1a8f4121206..97475bb46f84 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c @@ -487,16 +487,19 @@ int vt_ioctl(struct tty_struct *tty, ret = -EINVAL; goto out; } - /* FIXME: this needs the console lock extending */ - if (vc->vc_mode == (unsigned char) arg) + console_lock(); + if (vc->vc_mode == (unsigned char) arg) { + console_unlock(); break; + } vc->vc_mode = (unsigned char) arg; - if (console != fg_console) + if (console != fg_console) { + console_unlock(); break; + } /* * explicitly blank/unblank the screen if switching modes */ - console_lock(); if (arg == KD_TEXT) do_unblank_screen(1); else |