History

Merge tag 'tty-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH: "Here are some small TTY and serial driver fixes for 6.5-rc4 for some reported problems. Included in here is: - TIOCSTI fix for braille readers - documentation fix for minor numbers - MAINTAINERS update for new serial files in -rc1 - minor serial driver fixes for reported problems All of these have been in linux-next with no reported problems" * tag 'tty-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: 8250_dw: Preserve original value of DLF register tty: serial: sh-sci: Fix sleeping in atomic context serial: sifive: Fix sifive_serial_console_setup() section Documentation: devices.txt: reconcile serial/ucc_uart minor numers MAINTAINERS: Update TTY layer for lists and recently added files tty: n_gsm: fix UAF in gsm_cleanup_mux TIOCSTI: always enable for CAP_SYS_ADMIN

Linus Torvalds committed 3 years ago

Commit e6d34ce2 parents 3d6b77a 748c5ea8 files · +18 −8Browse files

Unified · Split

8 files
  1. Documentation/admin-guide/devices.txt +1 −1
  2. MAINTAINERS +6 −0
  3. drivers/tty/n_gsm.c +3 −1
  4. drivers/tty/serial/8250/8250_dwlib.c +4 −2
  5. drivers/tty/serial/sh-sci.c +1 −1
  6. drivers/tty/serial/sifive.c +1 −1
  7. drivers/tty/serial/ucc_uart.c +1 −1
  8. drivers/tty/tty_io.c +1 −1
Documentation/admin-guide/devices.txt+1−1
@@ -2691,7 +2691,7 @@ · 2690 unmodified lines
2691 45 = /dev/ttyMM1 Marvell MPSC - port 1 (obsolete unused)2691 45 = /dev/ttyMM1 Marvell MPSC - port 1 (obsolete unused)
2692 46 = /dev/ttyCPM0 PPC CPM (SCC or SMC) - port 02692 46 = /dev/ttyCPM0 PPC CPM (SCC or SMC) - port 0
2693 ...2693 ...
2694 47 = /dev/ttyCPM5 PPC CPM (SCC or SMC) - port 52694 49 = /dev/ttyCPM5 PPC CPM (SCC or SMC) - port 3
2695 50 = /dev/ttyIOC0 Altix serial card2695 50 = /dev/ttyIOC0 Altix serial card
2696 ...2696 ...
2697 81 = /dev/ttyIOC31 Altix serial card2697 81 = /dev/ttyIOC31 Altix serial card
MAINTAINERS+6−0
@@ -21643,11 +21643,17 @@ F: Documentation/translations/zh_TW/ · 21642 unmodified lines
21643TTY LAYER21643TTY LAYER
21644M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>21644M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21645M: Jiri Slaby <jirislaby@kernel.org>21645M: Jiri Slaby <jirislaby@kernel.org>
21646L: linux-kernel@vger.kernel.org
21647L: linux-serial@vger.kernel.org
21646S: Supported21648S: Supported
21647T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git21649T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
21648F: Documentation/driver-api/serial/21650F: Documentation/driver-api/serial/
21649F: drivers/tty/21651F: drivers/tty/
21652F: drivers/tty/serial/serial_base.h
21653F: drivers/tty/serial/serial_base_bus.c
21650F: drivers/tty/serial/serial_core.c21654F: drivers/tty/serial/serial_core.c
21655F: drivers/tty/serial/serial_ctrl.c
21656F: drivers/tty/serial/serial_port.c
21651F: include/linux/selection.h21657F: include/linux/selection.h
21652F: include/linux/serial.h21658F: include/linux/serial.h
21653F: include/linux/serial_core.h21659F: include/linux/serial_core.h
drivers/tty/n_gsm.c+3−1
@@ -3070,8 +3070,10 @@ static void gsm_cleanup_mux(struct gsm_mux *gsm, bool disc) · 3069 unmodified lines
3070 gsm->has_devices = false;3070 gsm->has_devices = false;
3071 }3071 }
3072 for (i = NUM_DLCI - 1; i >= 0; i--)3072 for (i = NUM_DLCI - 1; i >= 0; i--)
3073 if (gsm->dlci[i])3073 if (gsm->dlci[i]) {
3074 gsm_dlci_release(gsm->dlci[i]);3074 gsm_dlci_release(gsm->dlci[i]);
3075 gsm->dlci[i] = NULL;
3076 }
3075 mutex_unlock(&gsm->mutex);3077 mutex_unlock(&gsm->mutex);
3076 /* Now wipe the queues */3078 /* Now wipe the queues */
3077 tty_ldisc_flush(gsm->tty);3079 tty_ldisc_flush(gsm->tty);
drivers/tty/serial/8250/8250_dwlib.c+4−2
@@ -244,7 +244,7 @@ void dw8250_setup_port(struct uart_port *p) · 243 unmodified lines
244 struct dw8250_port_data *pd = p->private_data;244 struct dw8250_port_data *pd = p->private_data;
245 struct dw8250_data *data = to_dw8250_data(pd);245 struct dw8250_data *data = to_dw8250_data(pd);
246 struct uart_8250_port *up = up_to_u8250p(p);246 struct uart_8250_port *up = up_to_u8250p(p);
247 u32 reg;247 u32 reg, old_dlf;
248 248
249 pd->hw_rs485_support = dw8250_detect_rs485_hw(p);249 pd->hw_rs485_support = dw8250_detect_rs485_hw(p);
250 if (pd->hw_rs485_support) {250 if (pd->hw_rs485_support) {
@@ -270,9 +270,11 @@ void dw8250_setup_port(struct uart_port *p) · 19 unmodified lines
270 dev_dbg(p->dev, "Designware UART version %c.%c%c\n",270 dev_dbg(p->dev, "Designware UART version %c.%c%c\n",
271 (reg >> 24) & 0xff, (reg >> 16) & 0xff, (reg >> 8) & 0xff);271 (reg >> 24) & 0xff, (reg >> 16) & 0xff, (reg >> 8) & 0xff);
272 272
273 /* Preserve value written by firmware or bootloader */
274 old_dlf = dw8250_readl_ext(p, DW_UART_DLF);
273 dw8250_writel_ext(p, DW_UART_DLF, ~0U);275 dw8250_writel_ext(p, DW_UART_DLF, ~0U);
274 reg = dw8250_readl_ext(p, DW_UART_DLF);276 reg = dw8250_readl_ext(p, DW_UART_DLF);
275 dw8250_writel_ext(p, DW_UART_DLF, 0);277 dw8250_writel_ext(p, DW_UART_DLF, old_dlf);
276 278
277 if (reg) {279 if (reg) {
278 pd->dlf_size = fls(reg);280 pd->dlf_size = fls(reg);
drivers/tty/serial/sh-sci.c+1−1
@@ -590,7 +590,7 @@ static void sci_start_tx(struct uart_port *port) · 589 unmodified lines
590 dma_submit_error(s->cookie_tx)) {590 dma_submit_error(s->cookie_tx)) {
591 if (s->cfg->regtype == SCIx_RZ_SCIFA_REGTYPE)591 if (s->cfg->regtype == SCIx_RZ_SCIFA_REGTYPE)
592 /* Switch irq from SCIF to DMA */592 /* Switch irq from SCIF to DMA */
593 disable_irq(s->irqs[SCIx_TXI_IRQ]);593 disable_irq_nosync(s->irqs[SCIx_TXI_IRQ]);
594 594
595 s->cookie_tx = 0;595 s->cookie_tx = 0;
596 schedule_work(&s->work_tx);596 schedule_work(&s->work_tx);
drivers/tty/serial/sifive.c+1−1
@@ -811,7 +811,7 @@ static void sifive_serial_console_write(struct console *co, const char *s, · 810 unmodified lines
811 local_irq_restore(flags);811 local_irq_restore(flags);
812}812}
813 813
814static int __init sifive_serial_console_setup(struct console *co, char *options)814static int sifive_serial_console_setup(struct console *co, char *options)
815{815{
816 struct sifive_serial_port *ssp;816 struct sifive_serial_port *ssp;
817 int baud = SIFIVE_DEFAULT_BAUD_RATE;817 int baud = SIFIVE_DEFAULT_BAUD_RATE;
drivers/tty/serial/ucc_uart.c+1−1
@@ -59,7 +59,7 @@ static int firmware_loaded; · 58 unmodified lines
59/* #define LOOPBACK */59/* #define LOOPBACK */
60 60
61/* The major and minor device numbers are defined in61/* The major and minor device numbers are defined in
62 * http://www.lanana.org/docs/device-list/devices-2.6+.txt. For the QE62 * Documentation/admin-guide/devices.txt. For the QE
63 * UART, we have major number 204 and minor numbers 46 - 49, which are the63 * UART, we have major number 204 and minor numbers 46 - 49, which are the
64 * same as for the CPM2. This decision was made because no Freescale part64 * same as for the CPM2. This decision was made because no Freescale part
65 * has both a CPM and a QE.65 * has both a CPM and a QE.
drivers/tty/tty_io.c+1−1
@@ -2285,7 +2285,7 @@ static int tiocsti(struct tty_struct *tty, char __user *p) · 2284 unmodified lines
2285 char ch, mbz = 0;2285 char ch, mbz = 0;
2286 struct tty_ldisc *ld;2286 struct tty_ldisc *ld;
2287 2287
2288 if (!tty_legacy_tiocsti)2288 if (!tty_legacy_tiocsti && !capable(CAP_SYS_ADMIN))
2289 return -EIO;2289 return -EIO;
2290 2290
2291 if ((current->signal->tty != tty) && !capable(CAP_SYS_ADMIN))2291 if ((current->signal->tty != tty) && !capable(CAP_SYS_ADMIN))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t