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

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

Fixes: 8b705ab1431e ("ipv4: Add a sysctl to control multipath hash fields")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
net/ipv4/route.c