]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Fix data-races around sysctl_fib_multipath_hash_policy.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 18 Jul 2022 17:26:40 +0000 (10:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jul 2022 09:14:49 +0000 (10:14 +0100)
commit32efd4ca4968e268051789e5387109c0c72cd20d
tree01ca6251b1d6dbba4235c77a72c5b453bf0ccab5
parent579b451998bfa384905861b10ca4bdb53e682ab6
ipv4: Fix data-races around sysctl_fib_multipath_hash_policy.

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

Fixes: cde8c3efa529 ("net: ipv4: add support for ECMP hash policy choice")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
net/ipv4/route.c