On Tue, Nov 05, 2019 at 12:14:42PM -0800, Jeffrey Hugo wrote: > Commit 7667819385457b4aeb5fac94f67f52ab52cc10d5 upstream. > > bam_dma_terminate_all() will leak resources if any of the transactions are > committed to the hardware (present in the desc fifo), and not complete. > Since bam_dma_terminate_all() does not cause the hardware to be updated, > the hardware will still operate on any previously committed transactions. > This can cause memory corruption if the memory for the transaction has been > reassigned, and will cause a sync issue between the BAM and its client(s). > > Fix this by properly updating the hardware in bam_dma_terminate_all(). > > Fixes: e7c0fe2a5c84 ("dmaengine: add Qualcomm BAM dma driver") > Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@xxxxxxxxx> > Cc: stable@xxxxxxxxxxxxxxx > Link: https://lore.kernel.org/r/20191017152606.34120-1-jeffrey.l.hugo@xxxxxxxxx > Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx> > --- > Backported to 4.14 which is lacking 6b4faeac05bc > ("dmaengine: qcom-bam: Process multiple pending descriptors") > This version also applies to 4.9. Thanks for this and the 4.4 backport, all now queued up. greg k-h