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: <8bdd1465-fcaf-4946-3ee9-baeec765247d@gmail.com>
Date:   Fri, 17 Jul 2020 10:30:18 -0700
From:   Doug Berger <opendmb@...il.com>
To:     Zhang Changzhong <zhangchangzhong@...wei.com>,
        f.fainelli@...il.com, davem@...emloft.net, kuba@...nel.org
Cc:     bcm-kernel-feedback-list@...adcom.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: bcmgenet: fix error returns in
 bcmgenet_probe()

On 7/17/2020 1:19 AM, Zhang Changzhong wrote:
> The driver forgets to call clk_disable_unprepare() in error path after
> a success calling for clk_prepare_enable().
> 
> Fix to goto err_clk_disable if clk_prepare_enable() is successful.
> 
> Signed-off-by: Zhang Changzhong <zhangchangzhong@...wei.com>
> ---
>  drivers/net/ethernet/broadcom/genet/bcmgenet.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> index ee84a26..23df6f2 100644
> --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
> @@ -4016,7 +4016,7 @@ static int bcmgenet_probe(struct platform_device *pdev)
>  	if (err)
>  		err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
>  	if (err)
> -		goto err;
> +		goto err_clk_disable;
Please split this clause out as a separate pull-request with this fixes tag:
Fixes: 99d55638d4b0 ("net: bcmgenet: enable NETIF_F_HIGHDMA flag")

>  
>  	/* Mii wait queue */
>  	init_waitqueue_head(&priv->wq);
> @@ -4028,14 +4028,14 @@ static int bcmgenet_probe(struct platform_device *pdev)
>  	if (IS_ERR(priv->clk_wol)) {
>  		dev_dbg(&priv->pdev->dev, "failed to get enet-wol clock\n");
>  		err = PTR_ERR(priv->clk_wol);
> -		goto err;
> +		goto err_clk_disable;
>  	}
>  
>  	priv->clk_eee = devm_clk_get_optional(&priv->pdev->dev, "enet-eee");
>  	if (IS_ERR(priv->clk_eee)) {
>  		dev_dbg(&priv->pdev->dev, "failed to get enet-eee clock\n");
>  		err = PTR_ERR(priv->clk_eee);
> -		goto err;
> +		goto err_clk_disable;
>  	}
>  
>  	/* If this is an internal GPHY, power it on now, before UniMAC is
> 
Please split these changes into a pull-request with fixes tag:
Fixes: c80d36ff63a5 ("net: bcmgenet: Use devm_clk_get_optional() to get
the clocks")

Resubmit the pull-requests with [PATCH net].
That will make them easier to apply to stable branches.

Otherwise:
Acked-by: Doug Berger <opendmb@...il.com>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ