]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jul 2022 11:42:10 +0000 (12:42 +0100)
commit22396941a7f343d704738360f9ef0e6576489d43
tree70723212735e519a0ff8b80b00536d3c42558220
parent4866b2b0f7672b6d760c4b8ece6fb56f965dcc8a
tcp: Fix a data-race around sysctl_tcp_comp_sack_slack_ns.

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>
net/ipv4/tcp_input.c