]> git.baikalelectronics.ru Git - kernel.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:14:11 +0000 (17:14 +0200)
commit02ed3fd7c51225b95cd86f60fe758ddbeaf10dfc
tree839c4d5dbc1cc3012f6e7de034e6f64aeeed8930
parent66fa9c788384b9979a43e3d2fcb73df188ca8681
tcp/dccp: Fix a data-race around sysctl_tcp_fwmark_accept.

[ Upstream commit ff7c4b977a7d85e365d44a839cef44a69003a951 ]

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

Fixes: 7c9e98a19869 ("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