Commit 01a14098 authored by Matthew Finlay's avatar Matthew Finlay Committed by David S. Miller

net/mlx5e: Call vxlan_get_rx_port() with rtnl lock

Hold the rtnl lock when calling vxlan_get_rx_port().

Fixes: b7aade15 ("vxlan: break dependency with netdev drivers")
Signed-off-by: default avatarMatthew Finlay <matt@mellanox.com>
Reported-by: default avatarAlexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4b2523c1
...@@ -2938,8 +2938,11 @@ static void *mlx5e_create_netdev(struct mlx5_core_dev *mdev) ...@@ -2938,8 +2938,11 @@ static void *mlx5e_create_netdev(struct mlx5_core_dev *mdev)
goto err_tc_cleanup; goto err_tc_cleanup;
} }
if (mlx5e_vxlan_allowed(mdev)) if (mlx5e_vxlan_allowed(mdev)) {
rtnl_lock();
vxlan_get_rx_port(netdev); vxlan_get_rx_port(netdev);
rtnl_unlock();
}
mlx5e_enable_async_events(priv); mlx5e_enable_async_events(priv);
schedule_work(&priv->set_rx_mode_work); schedule_work(&priv->set_rx_mode_work);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment