On Thu, Mar 22, 2018 at 4:45 AM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > On Wed, Mar 21, 2018 at 09:46:56PM -0400, Frank Mori Hess wrote: >> Hi Linux serial maintainers, >> >> There appears to be a bug in 8250_dma.c where __dma_rx_complete is >> passed to the dmaengine as the completion callback for rx dma. >> __dma_rx_complete does not lock the port spinlock (since it is also >> called in contexts where the lock is already held). So a wrapper >> around __dma_rx_complete which does lock the port spinlock should be >> used as the completion callback instead. > > Can you write up a patch for this? > Well, it's a little tricky. There's also the issue of insuring __dma_rx_complete only runs once for a given transfer. Using dma->rx_running for that is not enough, since it may very quickly get set back to 1 after being cleared. Using dmaengine_synchronize or similar would require getting out of atomic context, which I suppose could be done if you disabled rx interrupts temporarily after a timeout happens. -- Frank -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html