diff options
author | Eric Dumazet <edumazet@google.com> | 2022-05-13 11:55:49 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-05-16 10:31:06 +0100 |
commit | 5d368f03280d3678433a7f119efe15dfbbb87bc8 (patch) | |
tree | 1749bbca069fafab9219ea4187c460d12c2c6bc7 /net/ipv6/udp.c | |
parent | ff0094030f146b44eba0da2d3f9dbddaa28ee3c0 (diff) | |
download | linux-stable-5d368f03280d3678433a7f119efe15dfbbb87bc8.tar.gz linux-stable-5d368f03280d3678433a7f119efe15dfbbb87bc8.tar.bz2 linux-stable-5d368f03280d3678433a7f119efe15dfbbb87bc8.zip |
ipv6: add READ_ONCE(sk->sk_bound_dev_if) in INET6_MATCH()
INET6_MATCH() runs without holding a lock on the socket.
We probably need to annotate most reads.
This patch makes INET6_MATCH() an inline function
to ease our changes.
v2: inline function only defined if IS_ENABLED(CONFIG_IPV6)
Change the name to inet6_match(), this is no longer a macro.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r-- | net/ipv6/udp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 960cfea82016..55afd7f39c04 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -1044,7 +1044,7 @@ static struct sock *__udp6_lib_demux_lookup(struct net *net, udp_portaddr_for_each_entry_rcu(sk, &hslot2->head) { if (sk->sk_state == TCP_ESTABLISHED && - INET6_MATCH(sk, net, rmt_addr, loc_addr, ports, dif, sdif)) + inet6_match(net, sk, rmt_addr, loc_addr, ports, dif, sdif)) return sk; /* Only check first socket in chain */ break; |