OSDN Git Service

mlxsw: spectrum_router: Do not assume RTNL is taken during nexthop init
authorIdo Schimmel <idosch@mellanox.com>
Thu, 20 Feb 2020 07:07:53 +0000 (09:07 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Feb 2020 18:04:34 +0000 (10:04 -0800)
commitc43ef22843db4a415d43854eaae4b08b9dcae394
tree6789954609c7cc1397ee7dff2e1a11d279c4d742
parenteb833eec3b4cad9d5ba54d573f88f756e4c5fb84
mlxsw: spectrum_router: Do not assume RTNL is taken during nexthop init

RTNL is going to be removed from route insertion path, so use
__in_dev_get_rcu() from an RCU read-side critical section instead of
__in_dev_get_rtnl() which assumes RTNL is taken.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c