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:	Sat, 20 Apr 2013 09:28:19 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Jon Hunter <jon-hunter@...com>
CC:	Vinod Koul <vinod.koul@...el.com>, Arnd Bergmann <arnd@...db.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] dma:of: Use a mutex to protect the of_dma_list

On 04/20/2013 12:45 AM, Jon Hunter wrote:
[...]
>> @@ -219,15 +183,15 @@ struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
>>  		if (of_dma_match_channel(np, name, i, &dma_spec))
>>  			continue;
>>  
>> -		ofdma = of_dma_get_controller(&dma_spec);
>> +		mutex_lock(&of_dma_lock);
>> +		ofdma = of_dma_find_controller(&dma_spec);
>>  
>> -		if (ofdma) {
>> +		if (ofdma)
>>  			chan = ofdma->of_dma_xlate(&dma_spec, ofdma);
> 
> I think that there is a problem here. For controllers using the
> of_dma_simple_xlate(), this will call dma_request_channel() which also
> uses a mutex.

That would only be a problem if it'd use the same mutex. Holding two mutexes at
the same time is not a problem per se.

- Lars
--
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