OSDN Git Service

tcp: Fix data-races around sysctl_tcp_max_reordering.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 18 Jul 2022 17:26:53 +0000 (10:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jul 2022 09:14:50 +0000 (10:14 +0100)
commita11e5b3e7a59fde1a90b0eaeaa82320495cf8cae
treeff4df38955777e54a0ce553283c9a1bd9c72224b
parent2d17d9c7382327d00aeaea35af44e9b26d53206e
tcp: Fix data-races around sysctl_tcp_max_reordering.

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

Fixes: dca145ffaa8d ("tcp: allow for bigger reordering level")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c