From: lars@metafoo.de (Lars-Peter Clausen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] dmaengine: edma: Implement device_synchronize callback
Date: Thu, 11 Feb 2016 10:41:45 +0100 [thread overview]
Message-ID: <56BC5759.80000@metafoo.de> (raw)
In-Reply-To: <1455181722-32099-1-git-send-email-peter.ujfalusi@ti.com>
On 02/11/2016 10:08 AM, Peter Ujfalusi wrote:
> We need the callback to support the dmaengine_terminate_sync().
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Looks good, but I noticed a slight race condition in
edma_completion_handler(). You need to fetch echan->desc while holding the
vchan.lock. Otherwise this can race against terminate_all() and the callback
might get scheduled even though terminate_all() completed and then there is
a race where the synchronize() operation could be called before the callback
gets scheduled, which means it doesn't do its intended job. Highly unlikely
to happen, but theoretically possible.
next prev parent reply other threads:[~2016-02-11 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 9:08 [PATCH v2] dmaengine: edma: Implement device_synchronize callback Peter Ujfalusi
2016-02-11 9:41 ` Lars-Peter Clausen [this message]
2016-02-11 11:12 ` Peter Ujfalusi
2016-02-11 12:13 ` Lars-Peter Clausen
2016-02-22 2:51 ` Vinod Koul
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=56BC5759.80000@metafoo.de \
--to=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).