]> git.itanic.dy.fi Git - linux-stable/commit
tcp: Fix data-races around sysctl_tcp_dsack.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 20 Jul 2022 16:50:12 +0000 (09:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Aug 2022 10:00:44 +0000 (12:00 +0200)
commitf10a5f905a97cb31e0d8a151c5af5fd2e4494f91
treefe356feaad9a3314cf97c6ae7a0fe32661c19a45
parent7fa8999b31674dc7697fa37a1eee088767cd84f3
tcp: Fix data-races around sysctl_tcp_dsack.

commit 58ebb1c8b35a8ef38cd6927431e0fa7b173a632d upstream.

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

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