diff options
| author | Kuniyuki Iwashima <[email protected]> | 2022-07-12 00:15:30 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2022-07-13 11:56:49 +0000 |
| commit | 4785a66702f086cf2ea84bdbe6ec921f274bd9f2 (patch) | |
| tree | 28f36a4bf5f7825aacde839ad3286e1c1cec8a84 /net/ipv4/sysctl_net_ipv4.c | |
| parent | raw: Fix a data-race around sysctl_raw_l3mdev_accept. (diff) | |
| download | kernel-4785a66702f086cf2ea84bdbe6ec921f274bd9f2.tar.gz kernel-4785a66702f086cf2ea84bdbe6ec921f274bd9f2.zip | |
tcp: Fix data-races around sysctl_tcp_ecn.
While reading sysctl_tcp_ecn, 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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/sysctl_net_ipv4.c')
| -rw-r--r-- | net/ipv4/sysctl_net_ipv4.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 66159d49a575..5e308c1715af 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -676,6 +676,8 @@ static struct ctl_table ipv4_net_table[] = { .maxlen = sizeof(u8), .mode = 0644, .proc_handler = proc_dou8vec_minmax, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_TWO, }, { .procname = "tcp_ecn_fallback", |
