summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipmr.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2024-02-22 10:50:17 +0000
committerDavid S. Miller <davem@davemloft.net>2024-02-26 11:46:12 +0000
commit22e36ea9f5d7707ae3d64c497d172f4ef735c353 (patch)
treeac682eeb74add4a984dec6c6505a3d2ff57a1e58 /net/ipv4/ipmr.c
parent69fdb7e411b6d01eb08447e672302b69c9e176ad (diff)
downloadlinux-22e36ea9f5d7707ae3d64c497d172f4ef735c353.tar.gz
linux-22e36ea9f5d7707ae3d64c497d172f4ef735c353.tar.bz2
linux-22e36ea9f5d7707ae3d64c497d172f4ef735c353.zip
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>
Diffstat (limited to 'net/ipv4/ipmr.c')
-rw-r--r--net/ipv4/ipmr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 5561bce3a37e..0708ac6f6c58 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -2587,7 +2587,9 @@ errout_free:
static int ipmr_rtm_dumproute(struct sk_buff *skb, struct netlink_callback *cb)
{
- struct fib_dump_filter filter = {};
+ struct fib_dump_filter filter = {
+ .rtnl_held = true,
+ };
int err;
if (cb->strict_check) {