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]
Date:	Mon, 4 Jan 2016 15:35:34 +0100
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Vinod Koul <vinod.koul@...el.com>,
	Ashutosh Dixit <ashutosh.dixit@...el.com>
Cc:	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 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.
--
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