]> git.ipfire.org Git - people/ms/linux.git/commit
net: Fix data-races around sysctl_optmem_max.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 23 Aug 2022 17:46:49 +0000 (10:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Aug 2022 12:46:57 +0000 (13:46 +0100)
commit7de6d09f51917c829af2b835aba8bb5040f8e86a
tree89c4f938d7771f6a35cc25e7e2c3db1d6566f293
parent6bae8ceb90ba76cdba39496db936164fa672b9be
net: Fix data-races around sysctl_optmem_max.

While reading sysctl_optmem_max, 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 <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/bpf_sk_storage.c
net/core/filter.c
net/core/sock.c
net/ipv4/ip_sockglue.c
net/ipv6/ipv6_sockglue.c