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] [day] [month] [year] [list]
Message-ID: <CACDNBm3v1uW=ViC=ghfCx1a6EDFy1sJozntrKAzCQWmTzEoKWA@mail.gmail.com>
Date:	Tue, 18 Jun 2013 16:47:00 +0800
From:	Xiang Wang <wangxfdu@...il.com>
To:	Vinod Koul <vinod.koul@...el.com>
Cc:	Dan Williams <djbw@...com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	cxie4@...vell.com, Xiang Wang <wangx@...vell.com>
Subject: Re: [PATCH 1/2] dma: mmp_pdma: add protect when alloc/free phy channels

2013/6/17 Vinod Koul <vinod.koul@...el.com>:
> On Mon, Jun 03, 2013 at 04:02:08PM +0800, Xiang Wang wrote:
>> From: Xiang Wang <wangx@...vell.com>
>>
>> In mmp pdma, phy channels are allocated/freed dynamically
>> and frequently. But no proper protection is added.
>> Conflict will happen when multi-users are requesting phy
>> channels at the same time. Use spinlock to protect.
>>
>> Signed-off-by: Xiang Wang <wangx@...vell.com>
>> ---
>>  drivers/dma/mmp_pdma.c |   41 +++++++++++++++++++++++++----------------
>>  1 files changed, 25 insertions(+), 16 deletions(-)
>>
>
>> +static void free_phy(struct mmp_pdma_chan *pchan)
> pls namespace this
Updated in patch set V3. Thanks!
>> +{
>> +     struct mmp_pdma_device *pdev = to_mmp_pdma_dev(pchan->chan.device);
>> +     unsigned long flags;
> empty line pls
Updated in patch set V3. Thanks!
>
>> +     if (!pchan->phy)
>> +             return;
>> +
>> +     spin_lock_irqsave(&pdev->phy_lock, flags);
>> +     pchan->phy->vchan = NULL;
>> +     pchan->phy = NULL;
>> +     spin_unlock_irqrestore(&pdev->phy_lock, flags);
>> +}
>> +
> rest looks okay
>
> --
> ~Vinod



--
Regards,
Xiang
--
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