]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: E-Switch, Unload the representors in the correct order
authorShahar Klein <shahark@mellanox.com>
Tue, 1 Aug 2017 12:29:55 +0000 (15:29 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 30 Aug 2017 18:20:43 +0000 (21:20 +0300)
commit191220396db840822fc818edf03c49f0c02eb237
tree0c401bd61e15c406f8eaf09ecb854b1d39b74e1f
parent08820528c9d3ff0d0eda047d7ef5ecac2da1ef6c
net/mlx5: E-Switch, Unload the representors in the correct order

When changing from switchdev to legacy mode, all the representor port
devices (uplink nic and reps) are cleaned up. Part of this cleaning
process is removing the neigh entries and the hash table containing them.
However, a representor neigh entry might be linked to the uplink port
hash table and if the uplink nic is cleaned first the cleaning of the
representor will end up in null deref.
Fix that by unloading the representors in the opposite order of load.

Fixes: cb67b832921c ("net/mlx5e: Introduce SRIOV VF representors")
Signed-off-by: Shahar Klein <shahark@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c