]> www.infradead.org Git - users/dwmw2/linux.git/commit
ipv6: use READ_ONCE()/WRITE_ONCE() on fib6_table->fib_seq
authorEric Dumazet <edumazet@google.com>
Wed, 9 Oct 2024 18:44:03 +0000 (18:44 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Oct 2024 22:35:05 +0000 (15:35 -0700)
commite60ea45447768c48309b944596a8a34f6bae50e2
treefc1830061b00718564b760fe1239ffcbdb37f321
parent16207384d29287a19f81436e1953b41946aa8258
ipv6: use READ_ONCE()/WRITE_ONCE() on fib6_table->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 fib6_tables_seq_read() and
fib6_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-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/ip6_fib.h
net/ipv6/fib6_rules.c
net/ipv6/ip6_fib.c