]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 16 Sep 2022 08:53:24 +0000 (10:53 +0200)
commitc54cdda7bb83eb16ed7a665b4ebecc781e2fd15e
tree86e3346a8a83468c12e3dd99cb243d3f882ad6ce
parent3c3cde1ccfe43670b6af989a07e1ba4eaf12d4ab
ipv4: Fix a data-race around sysctl_fib_multipath_use_neigh.

BugLink: https://bugs.launchpad.net/bugs/1988479
[ Upstream commit 87507bcb4f5de16bb419e9509d874f4db6c0ad0f ]

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

Fixes: a6db4494d218 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/ipv4/fib_semantics.c