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: <CA+h21hqZnr1C5W6qMQMictdSROZvmggjXoYhX+=biEoT4Fs0jQ@mail.gmail.com>
Date:   Tue, 7 May 2019 16:49:24 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Petr Štetiar <ynezz@...e.cz>
Cc:     netdev <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Frank Rowand <frowand.list@...il.com>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Maxime Ripard <maxime.ripard@...tlin.com>
Subject: Re: [PATCH net-next v2 2/4] net: dsa: support of_get_mac_address new
 ERR_PTR error

On Tue, 7 May 2019 at 00:26, Petr Štetiar <ynezz@...e.cz> wrote:
>
> There was NVMEM support added to of_get_mac_address, so it could now
> return ERR_PTR encoded error values, so we need to adjust all current
> users of of_get_mac_address to this new fact.
>
> While at it, remove superfluous is_valid_ether_addr as the MAC address
> returned from of_get_mac_address is always valid and checked by
> is_valid_ether_addr anyway.
>
> Fixes: d01f449c008a ("of_net: add NVMEM support to of_get_mac_address")
> Signed-off-by: Petr Štetiar <ynezz@...e.cz>
> ---
>  net/dsa/slave.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/dsa/slave.c b/net/dsa/slave.c
> index 316bce9..fe7b6a6 100644
> --- a/net/dsa/slave.c
> +++ b/net/dsa/slave.c
> @@ -1418,7 +1418,7 @@ int dsa_slave_create(struct dsa_port *port)
>                                 NETIF_F_HW_VLAN_CTAG_FILTER;
>         slave_dev->hw_features |= NETIF_F_HW_TC;
>         slave_dev->ethtool_ops = &dsa_slave_ethtool_ops;
> -       if (port->mac && is_valid_ether_addr(port->mac))
> +       if (!IS_ERR_OR_NULL(port->mac))
>                 ether_addr_copy(slave_dev->dev_addr, port->mac);
>         else
>                 eth_hw_addr_inherit(slave_dev, master);
> --
> 1.9.1
>

Tested-by: Vladimir Oltean <olteanv@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ