From: "Garg, Shivank" <shivankg@amd.com>
To: "vkoul@kernel.org" <vkoul@kernel.org>,
"Frank.Li@kernel.org" <Frank.Li@kernel.org>,
"logang@deltatee.com" <logang@deltatee.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Cc: "dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Frank.Li@nxp.com" <Frank.Li@nxp.com>,
"sashiko-bot@kernel.org" <sashiko-bot@kernel.org>
Subject: Re: [PATCH v5 0/4] dmaengine: fix kref underflow and UAF in dma_chan_put()
Date: Mon, 31 Aug 2026 08:30:46 +0000 [thread overview]
Message-ID: <a378e7aff74cf7f9b8552e051effd7908c6521f9.camel@amd.com> (raw)
In-Reply-To: <20260822-dmaengine-kref-fix-v5-0-d4a4ee47d927@amd.com>
On Sat, 2026-08-22 at 19:22 +0000, Shivank Garg wrote:
> 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 v5:
> - Use int return type and add __must_check for dma_device_get() (Frank)
> - Drop the comment above synchronize_rcu() and note in the commit message
> that this will delay for grace period dma_list_mutex held (Logan)
> - Link to v4: https://lore.kernel.org/r/20260818-dmaengine-kref-fix-v4-0-c6ef991462a0@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 | 19 +++++++++++++++----
> 1 file changed, 15 insertions(+), 4 deletions(-)
> ---
> base-commit: a4ff2be345d0abc943da8dd8da98151843b750dc
> change-id: 20260518-dmaengine-kref-fix-7b21acb09455
>
> Best regards,
Hi Vinod,
Would you consider this series for next?
It applies cleanly on v7.3-rc1.
Thanks,
Shivank
prev parent reply other threads:[~2026-08-31 8:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-22 19:22 [PATCH v5 0/4] dmaengine: fix kref underflow and UAF in dma_chan_put() Shivank Garg
2026-08-22 19:22 ` [PATCH v5 1/4] dmaengine: add dma_device_get() helper Shivank Garg
2026-08-22 19:22 ` [PATCH v5 2/4] dmaengine: Fix device kref underflow in dma_chan_put() Shivank Garg
2026-08-22 19:35 ` sashiko-bot
2026-08-22 19:22 ` [PATCH v5 3/4] dmaengine: fix use-after-free in dma_chan_put() and dma_release_channel() Shivank Garg
2026-08-22 19:37 ` sashiko-bot
2026-08-22 19:22 ` [PATCH v5 4/4] dmaengine: wait for RCU readers before releasing dma_device Shivank Garg
2026-08-22 19:36 ` sashiko-bot
2026-08-31 8:30 ` Garg, Shivank [this message]
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=a378e7aff74cf7f9b8552e051effd7908c6521f9.camel@amd.com \
--to=shivankg@amd.com \
--cc=Frank.Li@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=akpm@linux-foundation.org \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=sashiko-bot@kernel.org \
--cc=stable@vger.kernel.org \
--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