fib: rules: no longer hold RTNL in fib_nl_dumprule()
authorEric Dumazet <edumazet@google.com>
Thu, 11 Apr 2024 13:33:40 +0000 (13:33 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 13 Apr 2024 02:09:31 +0000 (19:09 -0700)
commit32affa5578f0e6b9abef3623d3976395afbd265c
tree1a6541f6f2ecefd1eb7a852c02f75d077325a049
parent195b7fc53c6f45feb0f649c7c68af70900928253
fib: rules: no longer hold RTNL in fib_nl_dumprule()

- fib rules are already RCU protected, RTNL is not needed
  to get them.

- 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: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240411133340.1332796-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/fib_rules.c