mpls: no longer hold RTNL in mpls_netconf_dump_devconf()
authorEric Dumazet <edumazet@google.com>
Wed, 10 Apr 2024 11:19:50 +0000 (11:19 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 12 Apr 2024 02:38:37 +0000 (19:38 -0700)
commite0f89d2864b062b027196925ea19f94b2ce50d6a
treeccdd1d8a0509e56d36b821444b2c734f594fdbb0
parente1eb10f8ef1068e565b24daa3e95bd8bc95d8cdc
mpls: no longer hold RTNL in mpls_netconf_dump_devconf()

- Use for_each_netdev_dump() to no longer rely
  on net->dev_index_head hash table.

- No longer care of net->dev_base_seq

- Fix return value at the end of a dump,
  so that NLMSG_DONE can be appended to current skb,
  saving one recvmsg() system call.

- No longer grab RTNL, RCU protection is enough,
  afer adding one READ_ONCE(mdev->input_enabled)
  in mpls_netconf_fill_devconf()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240410111951.2673193-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mpls/af_mpls.c