]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 17 Oct 2022 09:56:28 +0000 (11:56 +0200)
commit57ce7f2b70714beee38332c3a5d0c589a27fd68b
tree35d51fd5b7984c40e0775b0731f89ba39c21f49b
parent287ef28174144064abcef76c49898e22b8685018
ipv6: add READ_ONCE(sk->sk_bound_dev_if) in INET6_MATCH()

BugLink: https://bugs.launchpad.net/bugs/1990162
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
include/net/inet6_hashtables.h
net/ipv4/inet_hashtables.c
net/ipv6/inet6_hashtables.c
net/ipv6/udp.c