On 3/10/21 8:02 AM, Petr Machata wrote:
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>
---
net/ipv4/nexthop.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
Reviewed-by: David Ahern <dsahern@kernel.org>