Re: [PATCH] mtd: rawnand: r852: serialize DMA timeout cleanup with interrupts
From: Miquel Raynal
Date: Fri Dec 04 2026 - 16:33:44 EST
On Sun, 08 Nov 2026 16:13:40 -0700, James Hilliard wrote:
> r852_do_dma() calls r852_dma_done() without irqlock when its completion
> wait times out. A completion interrupt can finish the same transfer and
> unmap its buffer before, or concurrently with, the timeout cleanup. The
> second cleanup then unmaps the buffer again and overwrites the result.
>
> Take irqlock after the wait and abort only if the DMA stage is still
> active. If the interrupt completed first, retain its result and copy
> successful bounced reads back to the caller even when the wait expired.
>
> [...]
Applied to nand/next, thanks!
[1/1] mtd: rawnand: r852: serialize DMA timeout cleanup with interrupts
commit: ad13db366e170aec428b9441f30b3d57d8d681fe
Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).
Kind regards,
Miquèl