net/mlx5: fix sharing context destroy order
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>
Fri, 5 Apr 2019 13:29:05 +0000 (13:29 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 12 Apr 2019 09:02:02 +0000 (11:02 +0200)
commit942d13e6e7d1511dd89b4352ab648e57ef934189
treee5ad28c19163a41d08753718b24c943076b3e584
parent9c2bbd048856f50297b3c2d751dd2ada7952b7f0
net/mlx5: fix sharing context destroy order

At the mlx5 device closing the shared IB context was destroyed
before cleanup routines completion. As it was found on some
setups (Netlink fails with old kernel drivers and we have to use
sysfs to retrieve interface index, this requires IB device name,
which is stored in shared context) the mlx5_nl_mac_addr_flush()
requires IB device name, and if shared context is removed it
causes the segmentation fault.

Fixes: 17e19bc4dde7 ("net/mlx5: add IB shared context alloc/free functions")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
drivers/net/mlx5/mlx5.c