]> git.baikalelectronics.ru Git - kernel.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)
commitbf5791759f846c475ef1f4b761f56b1e4716df47
treea571db15de0e5ac08997aab9705356eff39685b6
parent6ec8b4da081476c48417184be7a220690623396f
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: c42c4d1c4809 ("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