]> git.baikalelectronics.ru Git - kernel.git/commit
igmp: Fix a data-race around sysctl_igmp_max_memberships.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 15 Jul 2022 17:17:42 +0000 (10:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:14:12 +0000 (17:14 +0200)
commit07f0796c4e4479cb3b1127a6c6bbf84709c6828b
treeb9d5711df057f14cd46cd4996687b8b4e8a53ff5
parent1b2d9c121a0a443e515345f827beb893b33027f7
igmp: Fix a data-race around sysctl_igmp_max_memberships.

[ Upstream commit 43d4dea149af225d635a8f8d48760a152de66979 ]

While reading sysctl_igmp_max_memberships, it can be changed concurrently.
Thus, we need to add READ_ONCE() to its reader.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/igmp.c