diff options
author | Eric Dumazet <edumazet@google.com> | 2024-02-22 11:50:15 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-26 12:46:12 +0100 |
commit | 386520e0ecc01004d3a29c70c5a77d4bbf8a8420 (patch) | |
tree | 8b38b88d2c08478267f7098e060cdbbdb474d0d1 /net/core | |
parent | rtnetlink: change nlk->cb_mutex role (diff) | |
download | linux-386520e0ecc01004d3a29c70c5a77d4bbf8a8420.tar.xz linux-386520e0ecc01004d3a29c70c5a77d4bbf8a8420.zip |
rtnetlink: add RTNL_FLAG_DUMP_UNLOCKED flag
Similarly to RTNL_FLAG_DOIT_UNLOCKED, this new flag
allows dump operations registered via rtnl_register()
or rtnl_register_module() to opt-out from RTNL protection.
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/core')
-rw-r--r-- | net/core/rtnetlink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 060543fe7919..1b26dfa5668d 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -6532,6 +6532,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, } owner = link->owner; dumpit = link->dumpit; + flags = link->flags; if (type == RTM_GETLINK - RTM_BASE) min_dump_alloc = rtnl_calcit(skb, nlh); @@ -6549,6 +6550,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, .dump = dumpit, .min_dump_alloc = min_dump_alloc, .module = owner, + .flags = flags, }; err = netlink_dump_start(rtnl, skb, nlh, &c); /* netlink_dump_start() will keep a reference on |