Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

serial: 8250: Flush DMA Rx on RLSI

Returning true from handle_rx_dma() without flushing DMA first creates
a data ordering hazard. If DMA Rx has handled any character at the
point when RLSI occurs, the non-DMA path handles any pending characters
jumping them ahead of those characters that are pending under DMA.

Fixes: 75df022b5f89 ("serial: 8250_dma: Fix RX handling")
Cc: <stable@vger.kernel.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221108121952.5497-5-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ilpo Järvinen and committed by
Greg Kroah-Hartman
1980860e 7090abd6

+1 -2
+1 -2
drivers/tty/serial/8250/8250_port.c
··· 1901 1901 if (!up->dma->rx_running) 1902 1902 break; 1903 1903 fallthrough; 1904 + case UART_IIR_RLSI: 1904 1905 case UART_IIR_RX_TIMEOUT: 1905 1906 serial8250_rx_dma_flush(up); 1906 - fallthrough; 1907 - case UART_IIR_RLSI: 1908 1907 return true; 1909 1908 } 1910 1909 return up->dma->rx_dma(up);