Commit 3a984ded authored by Eric Dumazet's avatar Eric Dumazet Committed by Zheng Zengkai
Browse files

ipv6: add READ_ONCE(sk->sk_bound_dev_if) in INET6_MATCH()

stable inclusion
from stable-v5.10.137
commit 0de9b3f81e01a3804e14f7e9d30c66841bc31439
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0de9b3f81e01a3804e14f7e9d30c66841bc31439



--------------------------------

[ Upstream commit 5d368f03 ]

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: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent 574659dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment