From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: shyckless@gmail.com
Cc: ludovic.desroches@microchip.com, vkoul@kernel.org,
Frank.Li@kernel.org, dave.jiang@intel.com,
linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,
allen.lkml@gmail.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/2] dmaengine: idma64: Kill the channel tasklets in remove again
Date: Mon, 23 Nov 2026 11:48:59 +0200 [thread overview]
Message-ID: <awQMCxhy6BurLowU@ashevche-desk.local> (raw)
In-Reply-To: <20261123-dma-chancnt-v2-2-241b1672883e@gmail.com>
On Mon, Nov 23, 2026 at 01:17:38AM +0000, Suyuan Wang via B4 Relay wrote:
>
> idma64_remove() frees the IRQ and then kills the channel tasklets, as
> the comment there says, so that no tasklet scheduled by the interrupt
> runs after removal:
>
> for (i = 0; i < idma64->dma.chancnt; i++) {
> ...
> tasklet_kill(&idma64c->vchan.task);
> }
>
> Since commit e81274cd6b52 ("dmaengine: add support to dynamic
> register/unregister of channels"), dma_async_device_unregister()
> unregisters each channel and decrements dma.chancnt for it, so the
> count is 0 when this loop runs and no tasklet is killed. A tasklet
> scheduled by an interrupt can then run after the devm-allocated idma64
> and its channels have been freed.
>
> Read the channel count before unregistering the device.
>
> Found with a static analysis tool and checked by hand.
You have to wait a sensible time before resubmission.
Look at the v1 and act accordingly.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-11-23 9:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 1:17 [PATCH v2 0/2] dmaengine: Kill " Suyuan Wang via B4 Relay
2026-11-23 1:17 ` [PATCH v2 1/2] dmaengine: at_xdmac: Kill the channel tasklets before unregistering Suyuan Wang via B4 Relay
2026-11-23 1:17 ` [PATCH v2 2/2] dmaengine: idma64: Kill the channel tasklets in remove again Suyuan Wang via B4 Relay
2026-11-23 9:48 ` Andy Shevchenko [this message]
2026-11-23 10:47 ` Wong Steve
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=awQMCxhy6BurLowU@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=Frank.Li@kernel.org \
--cc=allen.lkml@gmail.com \
--cc=dave.jiang@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=shyckless@gmail.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®