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: <0dceaf8f-0a08-8515-5054-1f9395e9b60f@microchip.com>
Date:   Mon, 24 Jun 2019 15:55:41 +0000
From:   <Nicolas.Ferre@...rochip.com>
To:     <antoine.tenart@...tlin.com>, <davem@...emloft.net>
CC:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <Ludovic.Desroches@...rochip.com>, <alexandre.belloni@...tlin.com>
Subject: Re: [PATCH net] net: macb: do not copy the mac address if NULL

On 21/06/2019 at 17:26, Antoine Tenart wrote:
> This patch fixes the MAC address setup in the probe. The MAC address
> retrieved using of_get_mac_address was checked for not containing an
> error, but it may also be NULL which wasn't tested. Fix it by replacing
> IS_ERR with IS_ERR_OR_NULL.
> 
> Fixes: 541ddc66d665 ("net: macb: support of_get_mac_address new ERR_PTR error")
> Signed-off-by: Antoine Tenart <antoine.tenart@...tlin.com>

Acked-by: Nicolas Ferre <nicolas.ferre@...rochip.com>

It could be good to have this fix for 5.2-final...

Thanks!

> ---
>   drivers/net/ethernet/cadence/macb_main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 1241a2a73438..1cd1f2c36d6f 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -4304,7 +4304,7 @@ static int macb_probe(struct platform_device *pdev)
>   	if (PTR_ERR(mac) == -EPROBE_DEFER) {
>   		err = -EPROBE_DEFER;
>   		goto err_out_free_netdev;
> -	} else if (!IS_ERR(mac)) {
> +	} else if (!IS_ERR_OR_NULL(mac)) {
>   		ether_addr_copy(bp->dev->dev_addr, mac);
>   	} else {
>   		macb_get_hwaddr(bp);
> 


-- 
Nicolas Ferre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ