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:	Thu, 3 Mar 2011 09:14:46 +0530
From:	viresh kumar <viresh.kumar@...com>
To:	"Koul, Vinod" <vinod.koul@...el.com>
Cc:	"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
	Linus WALLEIJ <linus.walleij@...ricsson.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Shiraz HASHIM <shiraz.hashim@...com>,
	amitgoel <amit.goel@...com>,
	Armando VISCONTI <armando.visconti@...com>
Subject: Re: [PATCH 4/8 resend] dw_dmac: calling dwc_scan_descriptors from
 dwc_tx_status() after taking lock

On 03/02/2011 11:43 PM, Koul, Vinod wrote:
> On Mon, 2011-02-28 at 16:11 +0530, Viresh Kumar wrote:
>> Signed-off-by: Viresh Kumar <viresh.kumar@...com>
>> ---
>>  drivers/dma/dw_dmac.c |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
>> index 3bf4772..5cc5abf 100644
>> --- a/drivers/dma/dw_dmac.c
>> +++ b/drivers/dma/dw_dmac.c
>> @@ -830,7 +830,9 @@ dwc_tx_status(struct dma_chan *chan,
>>  
>>  	ret = dma_async_is_complete(cookie, last_complete, last_used);
>>  	if (ret != DMA_SUCCESS) {
>> +		spin_lock_bh(&dwc->lock);
>>  		dwc_scan_descriptors(to_dw_dma(chan->device), dwc);
>> +		spin_unlock_bh(&dwc->lock);
>>  
>>  		last_complete = dwc->completed;
>>  		last_used = chan->cookie;
> 
> Please always add a short description in the patch, helps in long run
> 

Sure.

> Shouldnt you be doing this for dwc_handle_error() as well? I see thats
> called without taking the lock....
> 

dwc_handle_error is called from dw_dma_tasklet with lock held. So its not
required there.

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