lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160104150714.GH2940@localhost>
Date:	Mon, 4 Jan 2016 20:37:14 +0530
From:	Vinod Koul <vinod.koul@...el.com>
To:	Lars-Peter Clausen <lars@...afoo.de>
Cc:	Ashutosh Dixit <ashutosh.dixit@...el.com>,
	linux-kernel@...r.kernel.org, dmaengine@...r.kernel.org,
	Sudeep Dutt <sudeep.dutt@...el.com>,
	Nikhil Rao <nikhil.rao@...el.com>,
	Siva Yerramreddy <yshivakrishna@...il.com>,
	Saurabh Sengar <saurabh.truth@...il.com>
Subject: Re: [PATCH] dma: Revert "dmaengine: mic_x100: add missing
 spin_unlock"

On Mon, Jan 04, 2016 at 03:35:34PM +0100, Lars-Peter Clausen wrote:
> On 01/04/2016 04:35 AM, Vinod Koul wrote:
> > On Tue, Dec 22, 2015 at 07:35:23PM -0800, Ashutosh Dixit wrote:
> >> This reverts commit e958e079e254 ("dmaengine: mic_x100: add missing
> >> spin_unlock").
> >>
> >> The above patch is incorrect. There is nothing wrong with the original
> >> code. The spin_lock is acquired in the "prep" functions and released
> >> in "submit".
> > 
> > And going by dmaengine sematics, I do not think that is entrely right.
> > 
> > A user may choose to prepare multiple desciptors and then sumbit later,
> > looking at code I do not see how that will work.
> 
> The DMAengine API actually mandates that prep and submit must always be
> called in pairs, without any other DMAengine calls in between. The patch is
> correct.
> 
> Quoting from Documentation/dmaengine/client.txt:
> 
>    Once a descriptor has been obtained, the callback information can be
>    added and the descriptor must then be submitted.  Some DMA engine
>    drivers may hold a spinlock between a successful preparation and
>    submission so it is important that these two operations are closely
>    paired.

This is true for slave cases as has been made clear in the Documentation.
For non slave cases that is not entirely right. mic_x100 falls in latter
category.

Thanks
-- 
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ