]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mpls: Convert mpls_dump_routes() to RCU.
authorKuniyuki Iwashima <kuniyu@google.com>
Wed, 29 Oct 2025 17:33:02 +0000 (17:33 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 4 Nov 2025 01:40:51 +0000 (17:40 -0800)
commitdde1b38e873cff70f0af36e884bbeb1b14a536ed
tree95515c85771700813d6a58f606d1908714c31bab
parent3a49629335a523341d3fae895435d5217341a022
mpls: Convert mpls_dump_routes() to RCU.

mpls_dump_routes() sets fib_dump_filter.rtnl_held to true and
calls __dev_get_by_index() in mpls_valid_fib_dump_req().

This is the only RTNL dependant in mpls_dump_routes().

Also, synchronize_rcu() in resize_platform_label_table()
guarantees that net->mpls.platform_label is alive under RCU.

Let's convert mpls_dump_routes() to RCU and use dev_get_by_index_rcu().

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Link: https://patch.msgid.link/20251029173344.2934622-11-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mpls/af_mpls.c