]> git.baikalelectronics.ru Git - kernel.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>
Wed, 17 Aug 2022 12:23:36 +0000 (14:23 +0200)
commit7bf61a9ee53ac373c8d6745f108d9f7211a20a41
tree433a403522dfe08105a8754a0bdde77792870311
parent35e2dc08e7ee2b454492e5c53a3b0b118a9d1ed4
ipv6: add READ_ONCE(sk->sk_bound_dev_if) in INET6_MATCH()

[ Upstream commit b6dd5eae77da5ad7a071ce769ee76a3922e46a7b ]

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