inet: allow ip_valid_fib_dump_req() to be called with RTNL or RCU
authorEric Dumazet <edumazet@google.com>
Thu, 22 Feb 2024 10:50:17 +0000 (10:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Feb 2024 11:46:12 +0000 (11:46 +0000)
commit22e36ea9f5d7707ae3d64c497d172f4ef735c353
treeac682eeb74add4a984dec6c6505a3d2ff57a1e58
parent69fdb7e411b6d01eb08447e672302b69c9e176ad
inet: allow ip_valid_fib_dump_req() to be called with RTNL or RCU

Add a new field into struct fib_dump_filter, to let callers
tell if they use RTNL locking or RCU.

This is used in the following patch, when inet_dump_fib()
no longer holds RTNL.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip_fib.h
net/ipv4/fib_frontend.c
net/ipv4/ipmr.c
net/ipv6/ip6_fib.c
net/ipv6/ip6mr.c
net/mpls/af_mpls.c