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]
Message-ID: <20130617132607.GA10671@intel.com>
Date:	Mon, 17 Jun 2013 18:56:07 +0530
From:	Vinod Koul <vinod.koul@...el.com>
To:	Xiang Wang <wangxfdu@...il.com>
Cc:	Dan Williams <djbw@...com>, 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

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
> +{
> +	struct mmp_pdma_device *pdev = to_mmp_pdma_dev(pchan->chan.device);
> +	unsigned long flags;
empty line pls

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