]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Fix a data-race around sysctl_tcp_frto.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 20 Jul 2022 16:50:15 +0000 (09:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Aug 2022 09:59:38 +0000 (11:59 +0200)
commitabb7ca34aa9f2e0d5a823b809504b791479428b4
treef204c5d4e17cabd885aa3c04f577141a3d195e02
parent62acec030edfe93f608ed6119ae0003166537da1
tcp: Fix a data-race around sysctl_tcp_frto.

commit 6c4e722a0255cce4b584bdbd17e3e16e77f17eed upstream.

While reading sysctl_tcp_frto, 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/tcp_input.c