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: <AM6PR04MB397687761B511A8E9ACEA5F4EC7B0@AM6PR04MB3976.eurprd04.prod.outlook.com>
Date:   Mon, 20 Jul 2020 17:43:50 +0000
From:   "Madalin Bucur (OSS)" <madalin.bucur@....nxp.com>
To:     Liu Jian <liujian56@...wei.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        Laurentiu Tudor <laurentiu.tudor@....com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH v2 net] dpaa_eth: Fix one possible memleak in
 dpaa_eth_probe

> -----Original Message-----
> From: Liu Jian <liujian56@...wei.com>
> Sent: Monday, July 20, 2020 5:28 PM
> To: Madalin Bucur <madalin.bucur@....com>; davem@...emloft.net;
> kuba@...nel.org; Laurentiu Tudor <laurentiu.tudor@....com>;
> netdev@...r.kernel.org
> Subject: [PATCH v2 net] dpaa_eth: Fix one possible memleak in
> dpaa_eth_probe
> 
> When dma_coerce_mask_and_coherent() fails, the alloced netdev need to be
> freed.
> 
> Fixes: 060ad66f9795 ("dpaa_eth: change DMA device")
> Signed-off-by: Liu Jian <liujian56@...wei.com>
> ---
> 
> v1->v2:
> Change targeting from "net-next" to "net"
> 
>  drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> index 2972244e6eb0..43570f4911ea 100644
> --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> @@ -2938,7 +2938,7 @@ static int dpaa_eth_probe(struct platform_device
> *pdev)
>  						   DMA_BIT_MASK(40));
>  	if (err) {
>  		netdev_err(net_dev, "dma_coerce_mask_and_coherent()
> failed\n");
> -		return err;
> +		goto free_netdev;
>  	}
> 
>  	/* If fsl_fm_max_frm is set to a higher value than the all-common
> 1500,
> --
> 2.17.1


Acked-by: Madalin Bucur <madalin.bucur@....nxp.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ