]> git.baikalelectronics.ru Git - kernel.git/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)
commitc6c7d376a5c72c480423cc1cf744c0e6caa09acf
tree66d7648a2edd38f2996da441df019b0632adb5ce
parentde140469a150ed8ee91b6f553b0f95af560fc502
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: 8beb10d72442 ("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