diff options
author | Matthew Finlay <matt@mellanox.com> | 2016-04-29 01:36:31 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-29 23:29:08 +0300 |
commit | 01a14098d3374e1b931d605da666300ee248d3d9 (patch) | |
tree | 721e35041ac75221b3c2779f06309176a3c384bd /drivers | |
parent | 4b2523c180c8e5e8e02b2d518d7b1dcb4c9d98de (diff) | |
download | linux-01a14098d3374e1b931d605da666300ee248d3d9.tar.xz |
net/mlx5e: Call vxlan_get_rx_port() with rtnl lock
Hold the rtnl lock when calling vxlan_get_rx_port().
Fixes: b7aade15485a ("vxlan: break dependency with netdev drivers")
Signed-off-by: Matthew Finlay <matt@mellanox.com>
Reported-by: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 8b0bd42a9762..48825cb69e7e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -2938,8 +2938,11 @@ static void *mlx5e_create_netdev(struct mlx5_core_dev *mdev) goto err_tc_cleanup; } - if (mlx5e_vxlan_allowed(mdev)) + if (mlx5e_vxlan_allowed(mdev)) { + rtnl_lock(); vxlan_get_rx_port(netdev); + rtnl_unlock(); + } mlx5e_enable_async_events(priv); schedule_work(&priv->set_rx_mode_work); |