mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nuno Sá via B4 Relay" <devnull+nuno.sa.analog.com@kernel.org>
To: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Vinod Koul <vkoul@kernel.org>,  Frank Li <Frank.Li@kernel.org>,
	Eliza Balas <eliza.balas@analog.com>
Subject: [PATCH 0/2] dmaengine: dma-axi-dmac: Some memory related fixes
Date: Thu, 26 Mar 2026 13:37:34 +0000	[thread overview]
Message-ID: <20260326-dma-dmac-handle-vunmap-v1-0-be3e46ffaf69@analog.com> (raw)

This series aims to fix some issues with axi-dmac driver related to
memory:

1. When testing the IP on a microblaze based platform, we get vmalloced
   memory when allocation DMAC descriptors which will lead to BUG() when
   releasing them. More on the commit message.
2. The second is related with a well known issues with devm allocations
   of reference counted objects on a provider-consumer relationship.
   Seems to be a knows issue in dmaengine but fix it in the AXI-DMAC
   driver by properly implementing .the device_release() callback.

Didn't add any fixes tag because for 1), it was not an issue when the
drivers was first implemented (just triggered very recently) and for 2),
because it seems like a well known issue. Anyways, for 2) seems more
reasonable to have a fixes tag (IMO) if you want me to add one.

Also note that my signoff on Eliza patch is merely because I'm sending
the patch on her behalf. I had not part in the solution (just improved
comments and commit message a bit).

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
Eliza Balas (1):
      dmaengine: dma-axi-dmac: Defer freeing DMA descriptors

Nuno Sá (1):
      dmaengine: dma-axi-dmac: fix use-after-free on unbind

 drivers/dma/dma-axi-dmac.c | 95 +++++++++++++++++++++++++++++++++++++---------
 1 file changed, 78 insertions(+), 17 deletions(-)
---
base-commit: b7560798466a07d9c3fb011698e92c335ab28baf
change-id: 20260325-dma-dmac-handle-vunmap-84a06df7d133
--

Thanks!
- Nuno Sá



             reply	other threads:[~2026-03-26 13:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26 13:37 Nuno Sá via B4 Relay [this message]
2026-03-26 13:37 ` [PATCH 1/2] dmaengine: dma-axi-dmac: Defer freeing DMA descriptors Nuno Sá via B4 Relay
2026-03-26 15:14   ` Nuno Sá
2026-03-26 13:37 ` [PATCH 2/2] dmaengine: dma-axi-dmac: fix use-after-free on unbind Nuno Sá via B4 Relay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260326-dma-dmac-handle-vunmap-v1-0-be3e46ffaf69@analog.com \
    --to=devnull+nuno.sa.analog.com@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=eliza.balas@analog.com \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®