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]
Date:   Thu, 8 Dec 2022 21:34:27 +0200
From:   Vladimir Oltean <olteanv@...il.com>
To:     Jerry Ray <jerry.ray@...rochip.com>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux@...linux.org.uk
Subject: Re: [PATCH net-next] lan9303: Fix read error execution path

Is it deliberate that you are targeting the "net-next" tree for new
features rather than "net" for bug fixes?

On Thu, Dec 08, 2022 at 01:30:05PM -0600, Jerry Ray wrote:
> This patch fixes an issue where a read failure of a port statistic counter
> will return unknown results.  While it is highly unlikely the read will
> ever fail, it is much cleaner to return a zero for the stat count.
> 
> Fixes: a1292595e006 ("net: dsa: add new DSA switch driver for the SMSC-LAN9303")
> 

There shouldn't be blank lines between the tags of a commit, see "git log"
for examples.

Not a reason in itself to resend, AFAIK.

> Signed-off-by: Jerry Ray <jerry.ray@...rochip.com>
> ---
>  drivers/net/dsa/lan9303-core.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
> index 80f07bd20593..2e270b479143 100644
> --- a/drivers/net/dsa/lan9303-core.c
> +++ b/drivers/net/dsa/lan9303-core.c
> @@ -1005,9 +1005,11 @@ static void lan9303_get_ethtool_stats(struct dsa_switch *ds, int port,
>  		ret = lan9303_read_switch_port(
>  			chip, port, lan9303_mib[u].offset, &reg);
>  
> -		if (ret)
> +		if (ret) {
>  			dev_warn(chip->dev, "Reading status port %d reg %u failed\n",
>  				 port, lan9303_mib[u].offset);
> +			reg = 0;
> +		}
>  		data[u] = reg;
>  	}
>  }
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists