]> git.ipfire.org Git - thirdparty/linux.git/commit
dev: Pass netdevice_tracker to dev_get_by_flags_rcu().
authorKuniyuki Iwashima <kuniyu@google.com>
Fri, 11 Jul 2025 05:10:59 +0000 (05:10 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 15 Jul 2025 00:11:14 +0000 (17:11 -0700)
commit2a683d005286018c6f47ef0e432829655a6a21a3
tree03dda37cbd079dd814f9b269fec9d4e648b5f40f
parentf25a7eaa897f21396e99f90809af82ca553c9d14
dev: Pass netdevice_tracker to dev_get_by_flags_rcu().

This is a follow-up for commit eb1ac9ff6c4a5 ("ipv6: anycast: Don't
hold RTNL for IPV6_JOIN_ANYCAST.").

We should not add a new device lookup API without netdevice_tracker.

Let's pass netdevice_tracker to dev_get_by_flags_rcu() and rename it
with netdev_ prefix to match other newer APIs.

Note that we always use GFP_ATOMIC for netdev_hold() as it's expected
to be called under RCU.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/netdev/20250708184053.102109f6@kernel.org/
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250711051120.2866855-1-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/netdevice.h
net/core/dev.c
net/ipv6/anycast.c