]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tcp/dccp: Fix a data-race around sysctl_tcp_fwmark_accept.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 13 Jul 2022 20:51:58 +0000 (13:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:05:45 +0000 (17:05 +0200)
commit13207f9485b5de68decf296ceb0046f5eabb2485
tree591b2c12c63b95b6fadb55f72cbd95f5878d2f14
parentfc92e3b4bebfdd986ef1d2c5019f236837b0b982
tcp/dccp: Fix a data-race around sysctl_tcp_fwmark_accept.

[ Upstream commit 1a0008f9df59451d0a17806c1ee1a19857032fa8 ]

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

Fixes: 84f39b08d786 ("net: support marking accepting TCP sockets")
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>
include/net/inet_sock.h