]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: add dev_net_rcu() helper
authorEric Dumazet <edumazet@google.com>
Wed, 5 Feb 2025 15:51:09 +0000 (15:51 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 7 Feb 2025 00:14:14 +0000 (16:14 -0800)
commit482ad2a4ace2740ca0ff1cbc8f3c7f862f3ab507
tree0b4e6f90221e6f42b978ca341b8ca3cc89b3ae1e
parent3cf0a98fea776adb09087e521fe150c295a4b031
net: add dev_net_rcu() helper

dev->nd_net can change, readers should either
use rcu_read_lock() or RTNL.

We currently use a generic helper, dev_net() with
no debugging support. We probably have many hidden bugs.

Add dev_net_rcu() helper for callers using rcu_read_lock()
protection.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250205155120.1676781-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/netdevice.h
include/net/net_namespace.h