nexthop: __nh_notifier_single_info_init(): Make nh_info an argument
authorPetr Machata <petrm@nvidia.com>
Thu, 11 Mar 2021 18:03:13 +0000 (19:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Mar 2021 00:12:59 +0000 (16:12 -0800)
commit96a856256a43b88202f2ac8933092940146102ed
tree1e4c7645e78566f08d8b3e4605d9b5be001eb480
parent597f48e46b6e9142d30eaa5881c1b98338f092db
nexthop: __nh_notifier_single_info_init(): Make nh_info an argument

The cited function currently uses rtnl_dereference() to get nh_info from a
handed-in nexthop. However, under the resilient hashing scheme, this
function will not always be called under RTNL, sometimes the mutual
exclusion will be achieved differently. Therefore move the nh_info
extraction from the function to its callers to make it possible to use a
different synchronization guarantee.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/nexthop.c