Re: [PATCH v5] serial: 8250_omap: clear rx_running on zero-length DMA completes
From: Matthias Feser
Date: Mon Jun 08 2026 - 07:04:26 EST
On Tue, Jun 02, 2026, Andy Shevchenko wrote:
> I'm wondering if this opens a window when dma->rx_buf may be
> rewritten (or unmapped or something else) before tty layer has
> a chance to insert bytes to its ring buffer. I.o.w. is this
> change synchronous to other threads?
Good point.
RX DMA can be started from the DMA callback, the IRQ path, and
runtime resume. These paths appear to be protected by the same
driver locking.
At the point where rx_running is cleared, DMA has already been
terminated.
So I don't see a window where rx_buf could be overwritten, but
please let me know if there is a path where this could happen.