Linux Serial subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Austin Schlegel" <schlegelas@outlook.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v3 2/3] serial: tegra: fix TX DMA descriptor use-after-free
Date: Thu, 22 Oct 2026 21:17:01 +0000	[thread overview]
Message-ID: <sashiko-outbox-182052@kernel.org> (raw)
In-Reply-To: <20261022-serial-tegra-dma-uaf-v3-2-129f6d67f673@outlook.com>

> From: Austin Schlegel <schlegelas@outlook.com>
> 
> tegra_uart_stop_tx() calls dmaengine_terminate_all() and then
> async_tx_ack(tup->tx_dma_desc) on the descriptor that was just
> terminated. With the GPC DMA driver, dmaengine_terminate_all() frees
> the active descriptor immediately, so the ack call that follows
> touches freed memory.
> 
> This is the same use-after-free pattern fixed for the RX path in
> tegra_uart_terminate_rx_dma() ("serial: tegra: fix RX DMA descriptor
> use-after-free"). dmaengine clients must not touch a descriptor once
> dmaengine_terminate_all() has returned.
> 
> Move the ack before dmaengine_terminate_all(), while the descriptor
> is still valid.
> [ ... ]
> Fixes: e9ea096dd225 ("serial: tegra: add serial driver")
> Cc: stable@vger.kernel.org
> Link: https://lore.kernel.org/all/sashiko-outbox-172211@kernel.org/
> Assisted-by: LLM
> Signed-off-by: Austin Schlegel <schlegelas@outlook.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261022-serial-tegra-dma-uaf-v3-0-129f6d67f673@outlook.com?part=2


  reply	other threads:[~2026-10-22 21:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 21:10 [PATCH v3 0/3] serial: tegra: fix DMA descriptor use-after-free and stale completions Austin Schlegel via B4 Relay
2026-10-22 21:10 ` [PATCH v3 1/3] serial: tegra: fix RX DMA descriptor use-after-free Austin Schlegel via B4 Relay
2026-10-22 21:17   ` sashiko-bot
2026-10-22 21:10 ` [PATCH v3 2/3] serial: tegra: fix TX " Austin Schlegel via B4 Relay
2026-10-22 21:17   ` sashiko-bot [this message]
2026-10-22 21:10 ` [PATCH v3 3/3] serial: tegra: ignore stale DMA completion callbacks Austin Schlegel via B4 Relay
2026-10-22 21:18   ` sashiko-bot
2026-10-27  6:52 ` [PATCH v3 0/3] serial: tegra: fix DMA descriptor use-after-free and stale completions Karl Mehltretter

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=sashiko-outbox-182052@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=schlegelas@outlook.com \
    /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