]> www.infradead.org Git - users/dwmw2/linux.git/commit
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>
Sun, 21 Aug 2022 13:15:51 +0000 (15:15 +0200)
commit0de9b3f81e01a3804e14f7e9d30c66841bc31439
tree71c1c692376dd784c2f39c1a6f14042f6eb7bfe6
parentb7325b27d8697a64858f673bbaba0741cff740cc
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