]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mpls: Pass net to mpls_dev_get().
authorKuniyuki Iwashima <kuniyu@google.com>
Wed, 29 Oct 2025 17:32:59 +0000 (17:32 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 4 Nov 2025 01:40:48 +0000 (17:40 -0800)
commit1fb462de9329731c17267c7ccf19619f22790a0a
treef49cb29c6d59a59441e6b4cd6591a4036303a3c0
parentab061f3347923b6e3aa7731056dc58cbe5044c9f
mpls: Pass net to mpls_dev_get().

We will replace RTNL with a per-netns mutex to protect dev->mpls_ptr.

Then, we will use rcu_dereference_protected() with the lockdep_is_held()
annotation, which requires net to access the per-netns mutex.

However, dev_net(dev) is not safe without RTNL.

Let's pass net to mpls_dev_get().

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