TTY/Serial fixes for 5.17-rc4
Here are 4 small tty/serial fixes for 5.17-rc4. They are: - 8250_pericom change revert to fix a reported regression - 2 speculation fixes for vt_ioctl - n_tty regression fix for polling All of these have been in linux-next for a while with no reported issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYgeKng8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ymATwCfRHoXJb38W5cXnHvOZgXpj71e0v0AoLeSOmYf OvSNZAhNF/kOHMbczUs9 =4Rr0 -----END PGP SIGNATURE----- Merge tag 'tty-5.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are four small tty/serial fixes for 5.17-rc4. They are: - 8250_pericom change revert to fix a reported regression - two speculation fixes for vt_ioctl - n_tty regression fix for polling All of these have been in linux-next for a while with no reported issues" * tag 'tty-5.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: vt_ioctl: add array_index_nospec to VT_ACTIVATE vt_ioctl: fix array_index_nospec in vt_setactivate serial: 8250_pericom: Revert "Re-enable higher baud rates" n_tty: wake up poll(POLLRDNORM) on receiving data
This commit is contained in:
commit
522e7d03f7
@ -1329,7 +1329,7 @@ handle_newline:
|
||||
put_tty_queue(c, ldata);
|
||||
smp_store_release(&ldata->canon_head, ldata->read_head);
|
||||
kill_fasync(&tty->fasync, SIGIO, POLL_IN);
|
||||
wake_up_interruptible_poll(&tty->read_wait, EPOLLIN);
|
||||
wake_up_interruptible_poll(&tty->read_wait, EPOLLIN | EPOLLRDNORM);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1561,7 +1561,7 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
|
||||
|
||||
if (read_cnt(ldata)) {
|
||||
kill_fasync(&tty->fasync, SIGIO, POLL_IN);
|
||||
wake_up_interruptible_poll(&tty->read_wait, EPOLLIN);
|
||||
wake_up_interruptible_poll(&tty->read_wait, EPOLLIN | EPOLLRDNORM);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ static int pericom8250_probe(struct pci_dev *pdev, const struct pci_device_id *i
|
||||
uart.port.private_data = pericom;
|
||||
uart.port.iotype = UPIO_PORT;
|
||||
uart.port.uartclk = 921600 * 16;
|
||||
uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ | UPF_MAGIC_MULTIPLIER;
|
||||
uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;
|
||||
uart.port.set_divisor = pericom_do_set_divisor;
|
||||
for (i = 0; i < nr && i < maxnr; i++) {
|
||||
unsigned int offset = (i == 3 && nr == 4) ? 0x38 : i * 0x8;
|
||||
|
@ -599,8 +599,8 @@ static int vt_setactivate(struct vt_setactivate __user *sa)
|
||||
if (vsa.console == 0 || vsa.console > MAX_NR_CONSOLES)
|
||||
return -ENXIO;
|
||||
|
||||
vsa.console = array_index_nospec(vsa.console, MAX_NR_CONSOLES + 1);
|
||||
vsa.console--;
|
||||
vsa.console = array_index_nospec(vsa.console, MAX_NR_CONSOLES);
|
||||
console_lock();
|
||||
ret = vc_allocate(vsa.console);
|
||||
if (ret) {
|
||||
@ -845,6 +845,7 @@ int vt_ioctl(struct tty_struct *tty,
|
||||
return -ENXIO;
|
||||
|
||||
arg--;
|
||||
arg = array_index_nospec(arg, MAX_NR_CONSOLES);
|
||||
console_lock();
|
||||
ret = vc_allocate(arg);
|
||||
console_unlock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user