“2fb42133c1f92be7e80a3067078460ea3d94f644”上不存在“...sun/nio/git@gitcode.net:openanolis/dragonwell8_jdk.git”
提交 f90d6aa0 编写于 作者: N Nikolay Aleksandrov 提交者: Zheng Zengkai

net: bridge: multicast: fix PIM hello router port marking race

stable inclusion
from stable-5.10.52
commit 664cc645bdd8ce3f000a5bec0eee0c7289395c27
bugzilla: 175542 https://gitee.com/openeuler/kernel/issues/I4DTKU

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

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

commit 04bef83a upstream.

When a PIM hello packet is received on a bridge port with multicast
snooping enabled, we mark it as a router port automatically, that
includes adding that port the router port list. The multicast lock
protects that list, but it is not acquired in the PIM message case
leading to a race condition, we need to take it to fix the race.

Cc: stable@vger.kernel.org
Fixes: 91b02d3d ("bridge: mcast: add router port on PIM hello message")
Signed-off-by: NNikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 36d02a6d
...@@ -2998,7 +2998,9 @@ static void br_multicast_pim(struct net_bridge *br, ...@@ -2998,7 +2998,9 @@ static void br_multicast_pim(struct net_bridge *br,
pim_hdr_type(pimhdr) != PIM_TYPE_HELLO) pim_hdr_type(pimhdr) != PIM_TYPE_HELLO)
return; return;
spin_lock(&br->multicast_lock);
br_multicast_mark_router(br, port); br_multicast_mark_router(br, port);
spin_unlock(&br->multicast_lock);
} }
static int br_ip4_multicast_mrd_rcv(struct net_bridge *br, static int br_ip4_multicast_mrd_rcv(struct net_bridge *br,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册