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 Jan 2013 14:08:34 +0530
From:	Santosh Shilimkar <santosh.shilimkar@...com>
To:	R Sricharan <r.sricharan@...com>
CC:	<ahemaily@...il.com>, <tony@...mide.com>,
	<linux-omap@...r.kernel.org>, <linux@....linux.org.uk>,
	<linux-kernel@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 1/1] arm :omap :DMA: fix a bug on reserving the omap SDMA
 channels

On Thursday 03 January 2013 12:58 PM, R Sricharan wrote:
> Hi,
>
> On Sunday 30 December 2012 02:13 AM, ahemaily@...il.com wrote:
>> From: ahemaily <ahemaily@...il.com>
>>
>> The variable  dma_lch_count  used for comparison
>> (omap_dma_reserve_channels <= dma_lch_count)
>> before it initialized to the value from omap_dma_dev_attr : d->lch_count.
>>
>> I change the place of dma_lch_count initialization to be before the
>> comparison.
>>
>> Signed-off-by: Abdelrahman Hemaily <ahemaily@...il.com>
>> ---
>>   arch/arm/plat-omap/dma.c |    4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
>> index c76ed8b..cb3e321 100644
>> --- a/arch/arm/plat-omap/dma.c
>> +++ b/arch/arm/plat-omap/dma.c
>> @@ -2014,12 +2014,12 @@ static int __devinit
>> omap_system_dma_probe(struct platform_device *pdev)
>>
>>       d            = p->dma_attr;
>>       errata            = p->errata;
>> -
>> +    dma_lch_count           = d->lch_count;
>> +
>>       if ((d->dev_caps & RESERVE_CHANNEL) && omap_dma_reserve_channels
>>               && (omap_dma_reserve_channels <= dma_lch_count))
>>           d->lch_count    = omap_dma_reserve_channels;
>>
>> -    dma_lch_count        = d->lch_count;
>     By removing this line, you are effectively not assigning
>     d->lch_count after reserving. So the patch should only change
>     dma_lch_count in the above "if statement" to d->lch_count
>
You are right. I missed it in last review. Below should be enough.

diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 37a488a..555ff7b 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -2019,7 +2019,7 @@ static int __devinit omap_system_dma_probe(struct 
platform_device *pdev)
  	errata			= p->errata;

  	if ((d->dev_caps & RESERVE_CHANNEL) && omap_dma_reserve_channels
-			&& (omap_dma_reserve_channels <= dma_lch_count))
+			&& (omap_dma_reserve_channels <= d->lch_coun))
  		d->lch_count	= omap_dma_reserve_channels;

  	dma_lch_count		= d->lch_count;
--
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