[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56BC5759.80000@metafoo.de>
Date: Thu, 11 Feb 2016 10:41:45 +0100
From: Lars-Peter Clausen <lars@...afoo.de>
To: Peter Ujfalusi <peter.ujfalusi@...com>, vinod.koul@...el.com
Cc: linux-kernel@...r.kernel.org, dmaengine@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, nsekhar@...com,
linux-omap@...r.kernel.org
Subject: Re: [PATCH v2] dmaengine: edma: Implement device_synchronize callback
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@...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.
Powered by blists - more mailing lists