Re: [PATCH] net: bcmgenet: Initialize u64 stats seq counter

From: Ryo Takakura
Date: Tue Jul 01 2025 - 05:09:13 EST


Hello Horman-san!

On Mon, 30 Jun 2025 17:21:47 +0100, Simon Horman wrote:
>On Sun, Jun 29, 2025 at 11:41:09AM +0000, Ryo Takakura wrote:
>> Initialize u64 stats as it uses seq counter on 32bit machines
>> as suggested by lockdep below.
>>
>> [ 1.830953][ T1] INFO: trying to register non-static key.
>> [ 1.830993][ T1] The code is fine but needs lockdep annotation, or maybe
>> [ 1.831027][ T1] you didn't initialize this object before use?
>> [ 1.831057][ T1] turning off the locking correctness validator.
>> [ 1.831090][ T1] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Tainted: G W 6.16.0-rc2-v7l+ #1 PREEMPT
>> [ 1.831097][ T1] Tainted: [W]=WARN
>> [ 1.831099][ T1] Hardware name: BCM2711
>> [ 1.831101][ T1] Call trace:
>> [ 1.831104][ T1] unwind_backtrace from show_stack+0x18/0x1c
>> [ 1.831120][ T1] show_stack from dump_stack_lvl+0x8c/0xcc
>> [ 1.831129][ T1] dump_stack_lvl from register_lock_class+0x9e8/0x9fc
>> [ 1.831141][ T1] register_lock_class from __lock_acquire+0x420/0x22c0
>> [ 1.831154][ T1] __lock_acquire from lock_acquire+0x130/0x3f8
>> [ 1.831166][ T1] lock_acquire from bcmgenet_get_stats64+0x4a4/0x4c8
>> [ 1.831176][ T1] bcmgenet_get_stats64 from dev_get_stats+0x4c/0x408
>> [ 1.831184][ T1] dev_get_stats from rtnl_fill_stats+0x38/0x120
>> [ 1.831193][ T1] rtnl_fill_stats from rtnl_fill_ifinfo+0x7f8/0x1890
>> [ 1.831203][ T1] rtnl_fill_ifinfo from rtmsg_ifinfo_build_skb+0xd0/0x138
>> [ 1.831214][ T1] rtmsg_ifinfo_build_skb from rtmsg_ifinfo+0x48/0x8c
>> [ 1.831225][ T1] rtmsg_ifinfo from register_netdevice+0x8c0/0x95c
>> [ 1.831237][ T1] register_netdevice from register_netdev+0x28/0x40
>> [ 1.831247][ T1] register_netdev from bcmgenet_probe+0x690/0x6bc
>> [ 1.831255][ T1] bcmgenet_probe from platform_probe+0x64/0xbc
>> [ 1.831263][ T1] platform_probe from really_probe+0xd0/0x2d4
>> [ 1.831269][ T1] really_probe from __driver_probe_device+0x90/0x1a4
>> [ 1.831273][ T1] __driver_probe_device from driver_probe_device+0x38/0x11c
>> [ 1.831278][ T1] driver_probe_device from __driver_attach+0x9c/0x18c
>> [ 1.831282][ T1] __driver_attach from bus_for_each_dev+0x84/0xd4
>> [ 1.831291][ T1] bus_for_each_dev from bus_add_driver+0xd4/0x1f4
>> [ 1.831303][ T1] bus_add_driver from driver_register+0x88/0x120
>> [ 1.831312][ T1] driver_register from do_one_initcall+0x78/0x360
>> [ 1.831320][ T1] do_one_initcall from kernel_init_freeable+0x2bc/0x314
>> [ 1.831331][ T1] kernel_init_freeable from kernel_init+0x1c/0x144
>> [ 1.831339][ T1] kernel_init from ret_from_fork+0x14/0x20
>> [ 1.831344][ T1] Exception stack(0xf082dfb0 to 0xf082dff8)
>> [ 1.831349][ T1] dfa0: 00000000 00000000 00000000 00000000
>> [ 1.831353][ T1] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
>> [ 1.831356][ T1] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
>>
>> Fixes: 59aa6e3072aa ("net: bcmgenet: switch to use 64bit statistics")
>> Signed-off-by: Ryo Takakura <ryotkkr98@xxxxxxxxx>
>
>Hi Takakura-san,
>
>Thanks for your patch.
>
>Unfortunately it doesn't apply cleanly which is needed by our CI to process
>your patch.
>
>Please:
>
>* Rebase and repost your patch on the net tree
>
>* Target your patch at net (as opposed to net-next) like this
>
> Subject: [PATCH net v2] ...
>
>* And include Florian's tag in v2
>
>* Post v2 as a new thread
>
>For more information please see
>https://docs.kernel.org/process/maintainer-netdev.html

Thank you for elaborating.
I'll resend v2 accordingly!

Sincerely,
Ryo Takakura