From: sashiko-bot@kernel.org
To: "Austin Schlegel" <schlegelas@outlook.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v3 1/3] serial: tegra: fix RX DMA descriptor use-after-free
Date: Thu, 22 Oct 2026 21:17:22 +0000 [thread overview]
Message-ID: <sashiko-outbox-182054@kernel.org> (raw)
In-Reply-To: <20261022-serial-tegra-dma-uaf-v3-1-129f6d67f673@outlook.com>
> From: Austin Schlegel <schlegelas@outlook.com>
>
> tegra_uart_terminate_rx_dma() calls dmaengine_terminate_all() and then
> tegra_uart_rx_buffer_push(), which calls async_tx_ack(tup->rx_dma_desc)
> on the just-terminated descriptor. With the GPC DMA driver,
> dmaengine_terminate_all() frees the active descriptor immediately, so
> the subsequent async_tx_ack() touches freed memory. dmaengine clients
> are not allowed to touch a descriptor once it has been terminated.
>
> Move the ack into the two call sites that still own a live descriptor:
> tegra_uart_rx_dma_complete() (before the completion callback hands the
> descriptor back) and tegra_uart_terminate_rx_dma() (before terminating),
> and drop it from tegra_uart_rx_buffer_push() itself, since that function
> no longer has a descriptor it's safe to ack.
>
> [ ... ]
>
> Fixes: b31245b94207 ("serial: tegra: ack the rx dma desc after transfer terminated")
> Cc: stable@vger.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=1
next prev parent reply other threads:[~2026-10-22 21:17 UTC|newest]
Thread overview: 12+ 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 ` Austin Schlegel
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:10 ` Austin Schlegel
2026-10-22 21:17 ` sashiko-bot [this message]
2026-10-22 21:10 ` [PATCH v3 2/3] serial: tegra: fix TX " Austin Schlegel via B4 Relay
2026-10-22 21:10 ` Austin Schlegel
2026-10-22 21:17 ` sashiko-bot
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:10 ` Austin Schlegel
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-182054@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.