summaryrefslogtreecommitdiff
path: root/include/linux/mlx5/driver.h
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2022-11-01 17:36:01 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2023-02-09 07:40:57 +0300
commitdca55da0a15717dde509d17163946e951bad56c4 (patch)
tree2ca0c18b8531afaaa229ec7237506fa3d5afc674 /include/linux/mlx5/driver.h
parentc7d4e6ab3165693342c21f6faf80d983137fee0c (diff)
downloadlinux-dca55da0a15717dde509d17163946e951bad56c4.tar.xz
RDMA/mlx5: Track netdev to avoid deadlock during netdev notifier unregister
When removing a network namespace with mlx5 devlink instance being in it, following callchain is performed: cleanup_net (takes down_read(&pernet_ops_rwsem) devlink_pernet_pre_exit() devlink_reload() mlx5_devlink_reload_down() mlx5_unload_one_devl_locked() mlx5_detach_device() del_adev() mlx5r_remove() __mlx5_ib_remove() mlx5_ib_roce_cleanup() mlx5_remove_netdev_notifier() unregister_netdevice_notifier (takes down_write(&pernet_ops_rwsem) This deadlocks. Resolve this by converting to register_netdevice_notifier_dev_net() which does not take pernet_ops_rwsem and moves the notifier block around according to netdev it takes as arg. Use previously introduced netdev added/removed events to track uplink netdev to be used for register_netdevice_notifier_dev_net() purposes. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'include/linux/mlx5/driver.h')
0 files changed, 0 insertions, 0 deletions