]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
tcp: Fix a data-race around sysctl_tcp_comp_sack_slack_ns.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 22 Jul 2022 18:22:02 +0000 (11:22 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 16 Sep 2022 08:53:45 +0000 (10:53 +0200)
commit9e3c9d3b5113e65f88363b012db53059ce3b6d22
treeec8d65f07ded8007895102c5dedb3d48f8f19a4c
parent63d32d832f4970baa5cb5fca1c76822b1596b0ad
tcp: Fix a data-race around sysctl_tcp_comp_sack_slack_ns.

BugLink: https://bugs.launchpad.net/bugs/1989218
[ Upstream commit 22396941a7f343d704738360f9ef0e6576489d43 ]

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

Fixes: a70437cc09a1 ("tcp: add hrtimer slack to sack compression")
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/ipv4/tcp_input.c