Skip to content

Commit 06adf2f

Browse files
ij-intelsmb49
authored andcommitted
serial: 8250: Flush DMA Rx on RLSI
BugLink: https://bugs.launchpad.net/bugs/2002347 commit 1980860 upstream. 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: 75df022 ("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> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent 17fd025 commit 06adf2f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,10 +1824,9 @@ static bool handle_rx_dma(struct uart_8250_port *up, unsigned int iir)
18241824
if (!up->dma->rx_running)
18251825
break;
18261826
fallthrough;
1827+
case UART_IIR_RLSI:
18271828
case UART_IIR_RX_TIMEOUT:
18281829
serial8250_rx_dma_flush(up);
1829-
/* fall-through */
1830-
case UART_IIR_RLSI:
18311830
return true;
18321831
}
18331832
return up->dma->rx_dma(up);

0 commit comments

Comments
 (0)