]> 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)
commit9eaa08880340d32ffe375905c0030e2f91f76f99
tree0c401bd61e15c406f8eaf09ecb854b1d39b74e1f
parenta74806cdeea863b6d130e710fc7a032d4fe775f0
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: 658ea29c0dcf ("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