From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v6 09/10] dmaengine: dw: synchronize completion callbacks
Date: Tue, 03 Nov 2026 22:41:19 +0000 [thread overview]
Message-ID: <sashiko-outbox-196147@kernel.org> (raw)
In-Reply-To: <20261103-submit-dw-dma-synchronize-v1-v6-9-2ee0c348224d@gmail.com>
> The controller tasklet can detach completed descriptors and invoke their
> callbacks outside the channel lock. Terminating the channel does not wait
> for those callbacks, and there is no device_synchronize hook. A client can
> therefore reuse callback state or release its buffers after
> dmaengine_synchronize() while an old callback still uses them.
>
> Disable and re-enable the controller tasklet from device_synchronize,
> outside the channel lock. Disabling waits for an executing tasklet,
> including descriptors it already removed from the channel lists. After
> termination, a later tasklet run cannot acquire another descriptor from
> the terminated channel. Clients must continue to exclude new submissions
> on that channel until synchronization finishes.
>
> The tasklet is shared, so other channels may schedule it while this wait
> is in progress. Preserve those pending runs: tasklet_kill() temporarily
> owns the scheduling bit and can consume a concurrent scheduling request,
> leaving controller interrupts masked. The disable/enable pair leaves the
> scheduling bit and pending tasklet queue intact. Other channels' hardware
> transfers continue, though their callbacks may be briefly deferred.
>
> Fixes: b36f09c3c441 ("dmaengine: Add transfer termination synchronization support")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://lore.kernel.org/r/sashiko-outbox-180707@kernel.org
> Cc: stable@vger.kernel.org
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103-submit-dw-dma-synchronize-v1-v6-0-2ee0c348224d@gmail.com?part=9
next prev parent reply other threads:[~2026-11-03 22:41 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 22:26 [PATCH v6 00/10] dmaengine: dw: serialize completion and termination James Hilliard
2026-11-03 22:26 ` [PATCH v6 01/10] dmaengine: dw: Fix XFER bit set, but channel not idle error James Hilliard
2026-11-03 22:38 ` sashiko-bot
2026-11-03 22:26 ` [PATCH v6 02/10] dmaengine: dw: serialize error recovery with channel termination James Hilliard
2026-11-03 22:31 ` sashiko-bot
2026-11-03 22:26 ` [PATCH v6 03/10] dmaengine: dw: complete cookies before releasing the channel lock James Hilliard
2026-11-03 22:31 ` sashiko-bot
2026-11-03 22:26 ` [PATCH v6 04/10] dmaengine: dw: extract hardware-LLP residue calculation James Hilliard
2026-11-03 22:31 ` sashiko-bot
2026-11-04 20:07 ` Frank Li
2026-11-03 22:26 ` [PATCH v6 05/10] dmaengine: dw: calculate residue in the status getter James Hilliard
2026-11-03 22:33 ` sashiko-bot
2026-11-04 20:21 ` Frank Li
2026-11-03 22:26 ` [PATCH v6 06/10] dmaengine: dw: simplify transfer-complete handling James Hilliard
2026-11-03 22:33 ` sashiko-bot
2026-11-04 20:27 ` Frank Li
2026-11-03 22:26 ` [PATCH v6 07/10] dmaengine: dw: report residue for queued transfers James Hilliard
2026-11-03 22:31 ` sashiko-bot
2026-11-03 22:26 ` [PATCH v6 08/10] dmaengine: dw: drain the tasklet before releasing channel resources James Hilliard
2026-11-03 22:47 ` sashiko-bot
2026-11-03 22:26 ` [PATCH v6 09/10] dmaengine: dw: synchronize completion callbacks James Hilliard
2026-11-03 22:41 ` sashiko-bot [this message]
2026-11-03 22:26 ` [PATCH v6 10/10] dmaengine: dw: Prevent tx-status calling DMA-desc callback James Hilliard
2026-11-03 22:39 ` sashiko-bot
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-196147@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=james.hilliard1@gmail.com \
--cc=linux-serial@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.