]> git.itanic.dy.fi Git - linux-stable/commit
ipv4: Fix data-races around sysctl_fib_notify_on_flag_change.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 22 Jul 2022 18:22:05 +0000 (11:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jul 2022 11:42:10 +0000 (12:42 +0100)
commit96b9bd8c6d125490f9adfb57d387ef81a55a103e
tree66d7648a2edd38f2996da441df019b0632adb5ce
parent870e3a634b6a6cb1543b359007aca73fe6a03ac5
ipv4: Fix data-races around sysctl_fib_notify_on_flag_change.

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

Fixes: 680aea08e78c ("net: ipv4: Emit notification when fib hardware flags are changed")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_trie.c