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: <20250804111251.GS8494@horms.kernel.org>
Date: Mon, 4 Aug 2025 12:12:51 +0100
From: Simon Horman <horms@...nel.org>
To: Mohsin Bashir <mohsin.bashr@...il.com>
Cc: netdev@...r.kernel.org, alexanderduyck@...com, andrew+netdev@...n.ch,
	davem@...emloft.net, edumazet@...gle.com, kernel-team@...a.com,
	kuba@...nel.org, linux-kernel@...r.kernel.org, pabeni@...hat.com,
	sdf@...ichev.me, vadim.fedorenko@...ux.dev
Subject: Re: [PATCH net 2/2] eth: fbnic: Lock the tx_dropped update

On Fri, Aug 01, 2025 at 07:46:36PM -0700, Mohsin Bashir wrote:
> Wrap copying of drop stats on TX path from fbd->hw_stats by the
> hw_stats_lock. Currently, it is being performed outside the lock and
> another thread accessing fbd->hw_stats can lead to inconsistencies.
> 
> Fixes: 5f8bd2ce8269 ("eth: fbnic: add support for TMI stats")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> Signed-off-by: Mohsin Bashir <mohsin.bashr@...il.com>

Thanks,

I note that hw_stats_lock is documented as protecting hw_stats.
And that it is already used for that purpose elsewhere in
fbnic_get_stats64().

I do wonder if some refactoring could allow only locking
hw_stats_lock once in fbnic_get_stats64(). But that line of thought
doesn't effect the correctness of this patch.

Reviewed-by: Simon Horman <horms@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ