]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Fix a data-race around sysctl_fib_multipath_use_neigh.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 18 Jul 2022 17:26:39 +0000 (10:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jul 2022 09:14:49 +0000 (10:14 +0100)
commit579b451998bfa384905861b10ca4bdb53e682ab6
treeba1da190ab8cfb9dde5bcdc80d4b0eaea50b4ad5
parent8b837d45d1f3f8a77d5ceee54ff11c8b5e5e2cdd
ipv4: Fix a data-race around sysctl_fib_multipath_use_neigh.

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

Fixes: f596ce6f4c9e ("net: ipv4: Consider failed nexthops in multipath routes")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_semantics.c