diff options
author | Eric Dumazet <edumazet@google.com> | 2024-02-28 16:54:30 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-03-01 11:42:31 +0300 |
commit | 32f754176e889cdfe989ef08ece19859427755df (patch) | |
tree | af0f0215d2574da45535a83add3e4336d5c16d59 /net/ipv6/ip6_output.c | |
parent | e0bb2675fea2783c45bb95d74f00c55156720863 (diff) | |
download | linux-32f754176e889cdfe989ef08ece19859427755df.tar.xz |
ipv6: annotate data-races around cnf.forwarding
idev->cnf.forwarding and net->ipv6.devconf_all->forwarding
might be read locklessly, add appropriate READ_ONCE()
and WRITE_ONCE() annotations.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 0559bd000585..444be8c84cc5 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -501,7 +501,7 @@ int ip6_forward(struct sk_buff *skb) u32 mtu; idev = __in6_dev_get_safely(dev_get_by_index_rcu(net, IP6CB(skb)->iif)); - if (net->ipv6.devconf_all->forwarding == 0) + if (READ_ONCE(net->ipv6.devconf_all->forwarding) == 0) goto error; if (skb->pkt_type != PACKET_HOST) |