Skip to content

Commit 3abd15e

Browse files
committed
Merge tag 'tty-6.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty / serial driver fixes from Greg KH: "Here are two tty/serial driver fixes for 6.6-rc4 that resolve some reported regressions: - revert a n_gsm change that ended up causing problems - 8250_port fix for irq data both have been in linux-next for over a week with no reported problems" * tag 'tty-6.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: Revert "tty: n_gsm: fix UAF in gsm_cleanup_mux" serial: 8250_port: Check IRQ data before use
2 parents ec8c298 + 29346e2 commit 3abd15e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

drivers/tty/n_gsm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3097,10 +3097,8 @@ static void gsm_cleanup_mux(struct gsm_mux *gsm, bool disc)
30973097
gsm->has_devices = false;
30983098
}
30993099
for (i = NUM_DLCI - 1; i >= 0; i--)
3100-
if (gsm->dlci[i]) {
3100+
if (gsm->dlci[i])
31013101
gsm_dlci_release(gsm->dlci[i]);
3102-
gsm->dlci[i] = NULL;
3103-
}
31043102
mutex_unlock(&gsm->mutex);
31053103
/* Now wipe the queues */
31063104
tty_ldisc_flush(gsm->tty);

drivers/tty/serial/8250/8250_port.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,10 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir)
19361936
skip_rx = true;
19371937

19381938
if (status & (UART_LSR_DR | UART_LSR_BI) && !skip_rx) {
1939-
if (irqd_is_wakeup_set(irq_get_irq_data(port->irq)))
1939+
struct irq_data *d;
1940+
1941+
d = irq_get_irq_data(port->irq);
1942+
if (d && irqd_is_wakeup_set(d))
19401943
pm_wakeup_event(tport->tty->dev, 0);
19411944
if (!up->dma || handle_rx_dma(up, iir))
19421945
status = serial8250_rx_chars(up, status);

0 commit comments

Comments
 (0)