[PATCH net] net: ti: icssg-prueth: Add lock to stats

Simon Horman horms at kernel.org
Wed Mar 19 07:17:02 PDT 2025


On Fri, Mar 14, 2025 at 03:57:21PM +0530, MD Danish Anwar wrote:
> Currently the API emac_update_hardware_stats() reads different ICSSG
> stats without any lock protection.
> 
> This API gets called by .ndo_get_stats64() which is only under RCU
> protection and nothing else. Add lock to this API so that the reading of
> statistics happens during lock.
> 
> Fixes: c1e10d5dc7a1 ("net: ti: icssg-prueth: Add ICSSG Stats")
> Signed-off-by: MD Danish Anwar <danishanwar at ti.com>
> ---
> NOTE: This was suggested by Jakub Kicinski <kuba at kernel.org> [1] to get
> this as bug fix in net during upstreaming of FW Stats for ICSSG driver
> This patch doesn't depend on [1] and can be applied cleanly on net/main
> 
> [1] https://lore.kernel.org/all/20250306165513.541ff46e@kernel.org/

Reviewed-by: Simon Horman <horms at kernel.org>




More information about the linux-arm-kernel mailing list