]> git.baikalelectronics.ru Git - kernel.git/commit
ip: Fix data-races around sysctl_ip_prot_sock.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 18 Jul 2022 17:26:42 +0000 (10:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jul 2022 09:14:49 +0000 (10:14 +0100)
commitc110ebf01e2c1587544b73d7b04a72b7c5a06501
tree47fb5876d7c291eda26016d3711002bfb19f9bf4
parent976e4650949a65bf481d47e4f3a8ad59e8cd1995
ip: Fix data-races around sysctl_ip_prot_sock.

sysctl_ip_prot_sock is accessed concurrently, and there is always a chance
of data-race.  So, all readers and writers need some basic protection to
avoid load/store-tearing.

Fixes: 6eb98b4f1505 ("Introduce a sysctl that modifies the value of PROT_SOCK.")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h
net/ipv4/sysctl_net_ipv4.c