tcp: Fix a data-race around sysctl_tcp_comp_sack_delay_ns.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 22 Jul 2022 18:22:01 +0000 (11:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jul 2022 11:42:09 +0000 (12:42 +0100)
commit4866b2b0f7672b6d760c4b8ece6fb56f965dcc8a
treea092b310a82f9cb47287056c35596ef21f8963b3
parent02739545951ad4c1215160db7fbf9b7a918d3c0b
tcp: Fix a data-race around sysctl_tcp_comp_sack_delay_ns.

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

Fixes: 6d82aa242092 ("tcp: add tcp_comp_sack_delay_ns sysctl")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c