netns: no longer hold RTNL in rtnl_net_dumpid()
authorEric Dumazet <edumazet@google.com>
Tue, 16 Apr 2024 14:07:39 +0000 (14:07 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 18 Apr 2024 01:30:28 +0000 (18:30 -0700)
commit1514b06aff1681a418089060f0ebe936c27481bc
tree5956a0d8af59e101b83d467a28cc096d1c8670bd
parent860a9bed265146b10311bcadbbcef59c3af4454d
netns: no longer hold RTNL in rtnl_net_dumpid()

- rtnl_net_dumpid() is already fully RCU protected,
  RTNL is not needed there.

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

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Link: https://lore.kernel.org/r/20240416140739.967941-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/net_namespace.c