]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mpls: Add mpls_dev_rcu().
authorKuniyuki Iwashima <kuniyu@google.com>
Wed, 29 Oct 2025 17:32:58 +0000 (17:32 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 4 Nov 2025 01:40:48 +0000 (17:40 -0800)
commitab061f3347923b6e3aa7731056dc58cbe5044c9f
tree7b1c2ef7aaa11e51f33dfd180d9941649324c4f7
parentbc7ebc569e8cc768342dfb01af1a26c7fbef513e
mpls: Add mpls_dev_rcu().

mpls_dev_get() uses rcu_dereference_rtnl() to fetch dev->mpls_ptr.

We will replace RTNL with a dedicated mutex to protect the field.

Then, we will use rcu_dereference_protected() for clarity.

Let's add mpls_dev_rcu() for the RCU reader.

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