]> git.ipfire.org Git - thirdparty/linux.git/commit
ipv4: use READ_ONCE()/WRITE_ONCE() on net->ipv4.fib_seq
authorEric Dumazet <edumazet@google.com>
Wed, 9 Oct 2024 18:44:02 +0000 (18:44 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Oct 2024 22:35:05 +0000 (15:35 -0700)
commit16207384d29287a19f81436e1953b41946aa8258
tree8897a7e78e28b8662b52b75c20ca64b7e1c3fb33
parenta716ff52bebfe806fbcf5227cee4c7bda4e6724b
ipv4: use READ_ONCE()/WRITE_ONCE() on net->ipv4.fib_seq

Using RTNL to protect ops->fib_rules_seq reads seems a big hammer.

Writes are protected by RTNL.
We can use READ_ONCE() when reading it.

Constify 'struct net' argument of fib4_rules_seq_read()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20241009184405.3752829-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/ip_fib.h
include/net/netns/ipv4.h
net/ipv4/fib_notifier.c
net/ipv4/fib_rules.c