Re: [PATCH] serial: qcom-geni: Drop unsafe rx_buf realloc from setup_fifos()
Praveen Talari <[email protected]>
| Newsgroups | org.kernel.vger.linux-serial,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi On 24-08-2026 18:26, Greg Kroah-Hartman wrote: > On Mon, Aug 24, 2026 at 04:15:14PM +0530, Praveen Talari wrote: >> The RX buffer is allocated once during probe using a fixed DMA_RX_BUF_SIZE >> and is DMA-mapped for the lifetime of the port. However, setup_fifos() >> attempts to reallocate rx_buf whenever the reported RX FIFO depth changes. >> Since the DMA mapping is not re-established after reallocation, the buffer >> pointer may change while the DMA engine continues using the stale DMA >> address. This can result in RX DMA targeting memory that no longer >> corresponds to the active buffer, leading to invalid DMA accesses and >> potential memory corruption. >> >> The RX FIFO depth is unrelated to the size of rx_buf. The buffer is >> allocated independently using DMA_RX_BUF_SIZE and all RX DMA paths consume >> it at that fixed size. As such, resizing the buffer based on FIFO depth >> changes provides no functional benefit. >> >> Signed-off-by: Praveen Talari <[email protected]> >> --- >> Signed-off-by: Praveen Talari <[email protected]> > Why is this signed-off-by twice, with different email addresses? Apologies, that was a mistake while updating the commit message. Only [email protected] should be present for upstream submissions. I'll fix it in the next revision Thanks, Praveen Talari > > confused, > > greg k-h