]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix data-races around sysctl_devconf_inherit_init_net.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 23 Aug 2022 17:46:57 +0000 (10:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Aug 2022 12:46:58 +0000 (13:46 +0100)
commit445630c4081bc770f14809b91a5934b9959b021c
treec684dfb70112852bc34790fed94b3cb894f52058
parent2939c10ce8cf51fc9b593a8006079ea2ff9db107
net: Fix data-races around sysctl_devconf_inherit_init_net.

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

Fixes: 6f31b347aa9c ("net: introduce a knob to control whether to inherit devconf config")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/ipv4/devinet.c
net/ipv6/addrconf.c