This is a note to let you know that I've just added the patch titled tcp: Fix a data-race around sysctl_tcp_app_win. to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tcp-fix-a-data-race-around-sysctl_tcp_app_win.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 02ca527ac5581cf56749db9fd03d854e842253dd Mon Sep 17 00:00:00 2001 From: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx> Date: Wed, 20 Jul 2022 09:50:13 -0700 Subject: tcp: Fix a data-race around sysctl_tcp_app_win. From: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx> commit 02ca527ac5581cf56749db9fd03d854e842253dd upstream. While reading sysctl_tcp_app_win, 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@xxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -432,7 +432,7 @@ static void tcp_grow_window(struct sock */ void tcp_init_buffer_space(struct sock *sk) { - int tcp_app_win = sock_net(sk)->ipv4.sysctl_tcp_app_win; + int tcp_app_win = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_app_win); struct tcp_sock *tp = tcp_sk(sk); int maxwin; Patches currently in stable-queue which might be from kuniyu@xxxxxxxxxx are queue-4.19/tcp-fix-a-data-race-around-sysctl_tcp_app_win.patch queue-4.19/tcp-fix-a-data-race-around-sysctl_tcp_nometrics_save.patch queue-4.19/tcp-fix-a-data-race-around-sysctl_tcp_adv_win_scale.patch queue-4.19/tcp-fix-a-data-race-around-sysctl_tcp_frto.patch queue-4.19/tcp-fix-data-races-around-sysctl_tcp_dsack.patch