Skip to content

Commit 522e7d0

Browse files
committed
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
2 parents 8518737 + 28cb138 commit 522e7d0

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

drivers/tty/n_tty.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ static void n_tty_receive_char_special(struct tty_struct *tty, unsigned char c)
13291329
put_tty_queue(c, ldata);
13301330
smp_store_release(&ldata->canon_head, ldata->read_head);
13311331
kill_fasync(&tty->fasync, SIGIO, POLL_IN);
1332-
wake_up_interruptible_poll(&tty->read_wait, EPOLLIN);
1332+
wake_up_interruptible_poll(&tty->read_wait, EPOLLIN | EPOLLRDNORM);
13331333
return;
13341334
}
13351335
}
@@ -1561,7 +1561,7 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
15611561

15621562
if (read_cnt(ldata)) {
15631563
kill_fasync(&tty->fasync, SIGIO, POLL_IN);
1564-
wake_up_interruptible_poll(&tty->read_wait, EPOLLIN);
1564+
wake_up_interruptible_poll(&tty->read_wait, EPOLLIN | EPOLLRDNORM);
15651565
}
15661566
}
15671567

drivers/tty/serial/8250/8250_pericom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static int pericom8250_probe(struct pci_dev *pdev, const struct pci_device_id *i
117117
uart.port.private_data = pericom;
118118
uart.port.iotype = UPIO_PORT;
119119
uart.port.uartclk = 921600 * 16;
120-
uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ | UPF_MAGIC_MULTIPLIER;
120+
uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;
121121
uart.port.set_divisor = pericom_do_set_divisor;
122122
for (i = 0; i < nr && i < maxnr; i++) {
123123
unsigned int offset = (i == 3 && nr == 4) ? 0x38 : i * 0x8;

drivers/tty/vt/vt_ioctl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,8 @@ static int vt_setactivate(struct vt_setactivate __user *sa)
599599
if (vsa.console == 0 || vsa.console > MAX_NR_CONSOLES)
600600
return -ENXIO;
601601

602-
vsa.console = array_index_nospec(vsa.console, MAX_NR_CONSOLES + 1);
603602
vsa.console--;
603+
vsa.console = array_index_nospec(vsa.console, MAX_NR_CONSOLES);
604604
console_lock();
605605
ret = vc_allocate(vsa.console);
606606
if (ret) {
@@ -845,6 +845,7 @@ int vt_ioctl(struct tty_struct *tty,
845845
return -ENXIO;
846846

847847
arg--;
848+
arg = array_index_nospec(arg, MAX_NR_CONSOLES);
848849
console_lock();
849850
ret = vc_allocate(arg);
850851
console_unlock();

0 commit comments

Comments
 (0)