ipv6: add READ_ONCE(sk->sk_bound_dev_if) in INET6_MATCH()
authorEric Dumazet <edumazet@google.com>
Fri, 13 May 2022 18:55:49 +0000 (11:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 May 2022 09:31:06 +0000 (10:31 +0100)
commit5d368f03280d3678433a7f119efe15dfbbb87bc8
tree1749bbca069fafab9219ea4187c460d12c2c6bc7
parentff0094030f146b44eba0da2d3f9dbddaa28ee3c0
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>
include/net/inet6_hashtables.h
net/ipv4/inet_hashtables.c
net/ipv6/inet6_hashtables.c
net/ipv6/udp.c