net/mlx5e: Eswitch, use state_lock to synchronize vlan change
authorVlad Buslov <vladbu@mellanox.com>
Tue, 11 Sep 2018 12:48:59 +0000 (15:48 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 29 Jul 2019 23:40:26 +0000 (16:40 -0700)
commit0e18134f4f9f1e5c75b63b84d250b116c76d5116
tree46db327d8a07e4188937642582c450634d244741
parent525e84bea52be145b0ae863ff8d242ce273e3bc6
net/mlx5e: Eswitch, use state_lock to synchronize vlan change

esw->state_lock is already used to protect vlan vport configuration change.
However, all preparation and correctness checks, and code that sets vport
data are not protected by this lock and assume external synchronization by
rtnl lock. In order to remove dependency on rtnl lock, extend
esw->state_lock protection to whole eswitch vlan add/del functions.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Reviewed-by: Jianbo Liu <jianbol@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c