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: <20130805154551.GP29095@intel.com>
Date:	Mon, 5 Aug 2013 21:15:51 +0530
From:	Vinod Koul <vinod.koul@...el.com>
To:	Lothar Waßmann <LW@...O-electronics.de>
Cc:	Jingchang Lu <b35083@...escale.com>,
	Xiaochun Li <b41219@...escale.com>,
	Alison Wang <b18965@...escale.com>,
	linux-kernel@...r.kernel.org, djbw@...com, shawn.guo@...aro.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 3/3] dma: Add Freescale eDMA engine driver support

On Mon, Aug 05, 2013 at 09:53:45AM +0200, Lothar Waßmann wrote:
> Hi,
> 
> Jingchang Lu writes:
> > Add Freescale enhanced direct memory(eDMA) controller support.
> > The eDMA controller deploys DMAMUXs routing DMA request sources(slot)
> > to eDMA channels.
> > This module can be found on Vybrid and LS-1 SoCs.
> > 
> [...]
> > +static struct fsl_edma_desc *fsl_edma_alloc_desc(struct fsl_edma_chan *fsl_chan,
> > +		int sg_len)
> > +{
> > +	struct fsl_edma_desc *fsl_desc;
> > +	int size, i;
> > +
> > +	size = sizeof(struct fsl_edma_desc);
> > +	size += sizeof(struct fsl_edma_sw_tcd) * sg_len;
> > +	fsl_desc = kzalloc(size, GFP_KERNEL);
> > +	if (!fsl_desc)
> > +		return NULL;
> > +
> > +	fsl_desc->echan = fsl_chan;
> > +	fsl_desc->n_tcds = sg_len;
> > +	for (i = 0; i < sg_len; i++) {
> > +		fsl_desc->tcd[i].vtcd = dma_pool_alloc(fsl_chan->tcd_pool,
> > +					GFP_ATOMIC, &fsl_desc->tcd[i].ptcd);
> >
> Why is this called with GFP_ATOMIC while fsl_desc above is being
> allocated with GFP_KERNEL?
Both need to be GFP_ATOMIC, better they need to be GFP_NOWAIT.

~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