]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mctp: no longer rely on net->dev_index_head[]
authorEric Dumazet <edumazet@google.com>
Fri, 6 Dec 2024 22:38:11 +0000 (22:38 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 May 2025 12:12:16 +0000 (14:12 +0200)
commit2d45eeb7d5d7019b623d513be813123cd048c059
tree13358cb8fd529216c8caa0461ae48f33ccd3b3d0
parent7777ca11a40bb9041db3e6f5800d89f855e5f482
mctp: no longer rely on net->dev_index_head[]

[ Upstream commit 2d20773aec14996b6cc4db92d885028319be683d ]

mctp_dump_addrinfo() is one of the last users of
net->dev_index_head[] in the control path.

Switch to for_each_netdev_dump() for better scalability.

Use C99 for mctp_device_rtnl_msg_handlers[] to prepare
future RTNL removal from mctp_dump_addrinfo()

(mdev->addrs is not yet RCU protected)

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Matt Johnston <matt@codeconstruct.com.au>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Jeremy Kerr <jk@codeconstruct.com.au>
Link: https://patch.msgid.link/20241206223811.1343076-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: f11cf946c0a9 ("net: mctp: Don't access ifa_index when missing")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mctp/device.c