]> www.infradead.org Git - users/dwmw2/linux.git/commit
nexthop: Fix data-races around nexthop_compat_mode.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 12 Jul 2022 00:15:33 +0000 (17:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Jul 2022 11:56:50 +0000 (12:56 +0100)
commitbdf00bf24bef9be1ca641a6390fd5487873e0d2e
treea571db15de0e5ac08997aab9705356eff39685b6
parente49e4aff7ec19b2d0d0957ee30e93dade57dab9e
nexthop: Fix data-races around nexthop_compat_mode.

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

Fixes: 4f80116d3df3 ("net: ipv4: add sysctl for nexthop api compatibility mode")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_semantics.c
net/ipv4/nexthop.c
net/ipv6/route.c