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: <20241210191519.67a91a50@kernel.org>
Date: Tue, 10 Dec 2024 19:15:19 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Moon Yeounsu <yyyynoom@...il.com>
Cc: Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v5] net: dlink: add support for reporting stats
 via `ethtool -S` and `ip -s -s link show`

On Mon,  9 Dec 2024 18:28:27 +0900 Moon Yeounsu wrote:
> +	unsigned long flags;
> +
> +	spin_lock_irqsave(&np->stats_lock, flags);

I believe spin_lock_bh() is sufficient here, no need to save IRQ flags.

> +	u64 collisions = np->single_collisions + np->multi_collisions;
> +	u64 tx_frames_abort = np->tx_frames_abort;
> +	u64 tx_carrier_errors = np->tx_carrier_sense_errors;

Please don't mix code and variable declarations.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ