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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:36 +0000 (14:23 +0200)
commit8fd69d3df9f434ae417b5f352c3d666544d10546
tree433a403522dfe08105a8754a0bdde77792870311
parent68bf74ec95c3046f51893a9c80e2d4ac526600de
ipv6: add READ_ONCE(sk->sk_bound_dev_if) in INET6_MATCH()

[ Upstream commit 5d368f03280d3678433a7f119efe15dfbbb87bc8 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/inet6_hashtables.h
net/ipv4/inet_hashtables.c
net/ipv6/inet6_hashtables.c
net/ipv6/udp.c