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: <5757D5DB.5030401@nvidia.com>
Date:	Wed, 8 Jun 2016 09:22:51 +0100
From:	Jon Hunter <jonathanh@...dia.com>
To:	Peter Griffin <peter.griffin@...aro.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>, <kernel@...inux.com>,
	<vinod.koul@...el.com>, <linus.walleij@...aro.org>,
	<dan.j.williams@...el.com>, <leoli@...escale.com>,
	<zw@...kernel.org>, <baohua@...nel.org>,
	<maxime.ripard@...e-electrons.com>, <wens@...e.org>,
	<ldewangan@...dia.com>, <swarren@...dotorg.org>,
	<thierry.reding@...il.com>, <gnurou@...il.com>
CC:	<lee.jones@...aro.org>, <dmaengine@...r.kernel.org>,
	<linux-tegra@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCH 8/8] dmaengine: Remove site specific OOM error messages on
 kzalloc


On 07/06/16 18:38, Peter Griffin wrote:
> If kzalloc() fails it will issue it's own error message including
> a dump_stack(). So remove the site specific error messages.
> 
> Signed-off-by: Peter Griffin <peter.griffin@...aro.org>
> ---
>  drivers/dma/amba-pl08x.c        | 10 +---------
>  drivers/dma/bestcomm/bestcomm.c |  2 --
>  drivers/dma/edma.c              | 16 ++++------------
>  drivers/dma/fsldma.c            |  2 --
>  drivers/dma/k3dma.c             | 10 ++++------
>  drivers/dma/mmp_tdma.c          |  5 ++---
>  drivers/dma/moxart-dma.c        |  4 +---
>  drivers/dma/nbpfaxi.c           |  5 ++---
>  drivers/dma/pl330.c             |  5 +----
>  drivers/dma/ppc4xx/adma.c       |  2 --
>  drivers/dma/s3c24xx-dma.c       |  5 +----
>  drivers/dma/sh/shdmac.c         |  9 ++-------
>  drivers/dma/sh/sudmac.c         |  9 ++-------
>  drivers/dma/sirf-dma.c          |  5 ++---
>  drivers/dma/ste_dma40.c         |  4 +---
>  drivers/dma/tegra20-apb-dma.c   | 11 +++--------
>  drivers/dma/timb_dma.c          |  8 ++------
>  17 files changed, 28 insertions(+), 84 deletions(-)

[snip]

> diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
> index 7f4af8c..032884f 100644
> --- a/drivers/dma/tegra20-apb-dma.c
> +++ b/drivers/dma/tegra20-apb-dma.c
> @@ -300,10 +300,8 @@ static struct tegra_dma_desc *tegra_dma_desc_get(
>  
>  	/* Allocate DMA desc */
>  	dma_desc = kzalloc(sizeof(*dma_desc), GFP_NOWAIT);
> -	if (!dma_desc) {
> -		dev_err(tdc2dev(tdc), "dma_desc alloc failed\n");
> +	if (!dma_desc)
>  		return NULL;
> -	}
>  
>  	dma_async_tx_descriptor_init(&dma_desc->txd, &tdc->dma_chan);
>  	dma_desc->txd.tx_submit = tegra_dma_tx_submit;
> @@ -340,8 +338,7 @@ static struct tegra_dma_sg_req *tegra_dma_sg_req_get(
>  	spin_unlock_irqrestore(&tdc->lock, flags);
>  
>  	sg_req = kzalloc(sizeof(struct tegra_dma_sg_req), GFP_NOWAIT);
> -	if (!sg_req)
> -		dev_err(tdc2dev(tdc), "sg_req alloc failed\n");
> +
>  	return sg_req;
>  }
>  
> @@ -1319,10 +1316,8 @@ static int tegra_dma_probe(struct platform_device *pdev)
>  
>  	tdma = devm_kzalloc(&pdev->dev, sizeof(*tdma) + cdata->nr_channels *
>  			sizeof(struct tegra_dma_channel), GFP_KERNEL);
> -	if (!tdma) {
> -		dev_err(&pdev->dev, "Error: memory allocation failed\n");
> +	if (!tdma)
>  		return -ENOMEM;
> -	}
>  
>  	tdma->dev = &pdev->dev;
>  	tdma->chip_data = cdata;

For the tegra portion ...

Acked-by: Jon Hunter <jonathanh@...dia.com>

Cheers
Jon

-- 
nvpublic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ