From: Vinod Koul <vkoul@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Michal Simek <michal.simek@xilinx.com>,
Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>,
Shravya Kumbham <shravya.kumbham@xilinx.com>,
dmaengine@vger.kernel.org
Subject: Re: [PATCH] dmaengine: xilinx: Introduce synchronize() callback
Date: Tue, 16 Mar 2021 16:15:58 +0530 [thread overview]
Message-ID: <YFCMZthQen6RaFfU@vkoul-mobl> (raw)
In-Reply-To: <20210313125311.4823-1-lars@metafoo.de>
On 13-03-21, 13:53, Lars-Peter Clausen wrote:
> The Xilinx dmaengine driver uses a tasklet to process completed
> descriptors and execute their callbacks.
>
> Currently consumers of the DMA channel have to no method of synchronization
> against this tasklet when using the Xilinx dmaengine drivers. This can lead
> to race conditions when the consumer frees resources that are accessed in
> the callback before the tasklet has finished running.
>
> It is not enough to just call dmaengine_terminal_all() since on a
> multi-processor system the tasklet can run concurrently to it and might
> call the callback after dmaengine_terminate_all() has already finished.
>
> To mitigate this issue implement the synchronize() callback for the driver,
> which will wait until the tasklet has finished.
Applied, thanks
--
~Vinod
prev parent reply other threads:[~2021-03-16 10:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-13 12:53 [PATCH] dmaengine: xilinx: Introduce synchronize() callback Lars-Peter Clausen
2021-03-16 10:45 ` Vinod Koul [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=YFCMZthQen6RaFfU@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=michal.simek@xilinx.com \
--cc=radhey.shyam.pandey@xilinx.com \
--cc=shravya.kumbham@xilinx.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