]> git.baikalelectronics.ru Git - kernel.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)
commit7606b17035da834a286c94cfcc90f3ae7596324d
tree89c4f938d7771f6a35cc25e7e2c3db1d6566f293
parent3a82e726674fc0bd83a5a7a3f8e58d4b3fb9fe32
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