DMA Engine development
 help / color / mirror / Atom feed
* [PATCH v4 0/4] dmaengine: fix kref underflow and UAF in dma_chan_put()
@ 2026-08-18  3:43 Shivank Garg
  2026-08-18  3:43 ` [PATCH v4 1/4] dmaengine: add dma_device_get() helper Shivank Garg
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Shivank Garg @ 2026-08-18  3:43 UTC (permalink / raw)
  To: Vinod Koul, Frank Li, Logan Gunthorpe, Andrew Morton
  Cc: stable, dmaengine, linux-kernel, Shivank Garg, Frank Li, Sashiko

Fix bugs related to dma_chan_put(), found while testing with SDXI[1].

[1]: https://lore.kernel.org/dmaengine/20260605-sdxi-base-v3-0-4d38ca2bdffe@amd.com

Signed-off-by: Shivank Garg <shivankg@amd.com>
---
Changes in v4:
- Add dma_device_get() helper (Frank)
- Drop dma_chan_put() move change (Frank)
- Link to v3: https://lore.kernel.org/r/20260816-dmaengine-kref-fix-v3-0-7e76187145df@amd.com

Changes in v3:
- Add patch 3: add synchronize_rcu() to wait for RCU readers to prevent
  use-after-free. (Sashiko)
- Link to v2: https://lore.kernel.org/r/20260526-dmaengine-kref-fix-v2-0-3df60afac01d@amd.com

Changes in v2:
- Add patch 2 fixing the dma_chan_put()/dma_release_channel() use-after-free (sashiko)
- Link to v1: https://lore.kernel.org/r/20260518-dmaengine-kref-fix-v1-1-4d6125048fb7@amd.com

---
Shivank Garg (4):
      dmaengine: add dma_device_get() helper
      dmaengine: Fix device kref underflow in dma_chan_put()
      dmaengine: fix use-after-free in dma_chan_put() and dma_release_channel()
      dmaengine: wait for RCU readers before releasing dma_device

 drivers/dma/dmaengine.c | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
---
base-commit: 0d995da5fb97e8c312834575604d4423eb6225b7
change-id: 20260518-dmaengine-kref-fix-7b21acb09455

Best regards,
-- 
Shivank Garg <shivankg@amd.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-08-18  4:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18  3:43 [PATCH v4 0/4] dmaengine: fix kref underflow and UAF in dma_chan_put() Shivank Garg
2026-08-18  3:43 ` [PATCH v4 1/4] dmaengine: add dma_device_get() helper Shivank Garg
2026-08-18  4:00   ` sashiko-bot
2026-08-18  3:43 ` [PATCH v4 2/4] dmaengine: Fix device kref underflow in dma_chan_put() Shivank Garg
2026-08-18  3:58   ` sashiko-bot
2026-08-18  3:43 ` [PATCH v4 3/4] dmaengine: fix use-after-free in dma_chan_put() and dma_release_channel() Shivank Garg
2026-08-18  3:57   ` sashiko-bot
2026-08-18  3:43 ` [PATCH v4 4/4] dmaengine: wait for RCU readers before releasing dma_device Shivank Garg
2026-08-18  3:57   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox