Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1331791

Re: [PATCH v2] dmaengine: edma: Implement device_synchronize callback

From Lars-Peter Clausen <lars@metafoo.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2] dmaengine: edma: Implement device_synchronize callback
Date 2016-02-11 10:50 +0100
Message-ID <r0W2T-6Wl-17@gated-at.bofh.it> (permalink)
References <r0VzR-6IR-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] dmaengine: edma: Implement device_synchronize callback Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-02-11 10:20 +0100
  Re: [PATCH v2] dmaengine: edma: Implement device_synchronize callback Lars-Peter Clausen <lars@metafoo.de> - 2016-02-11 10:50 +0100
    Re: [PATCH v2] dmaengine: edma: Implement device_synchronize callback Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-02-11 12:20 +0100
      Re: [PATCH v2] dmaengine: edma: Implement device_synchronize callback Lars-Peter Clausen <lars@metafoo.de> - 2016-02-11 13:40 +0100
  Re: [PATCH v2] dmaengine: edma: Implement device_synchronize callback Vinod Koul <vinod.koul@intel.com> - 2016-02-22 03:50 +0100

csiph-web