]> git.baikalelectronics.ru Git - kernel.git/commit
mlx5: register lag notifier for init network namespace only
authorJiri Pirko <jiri@mellanox.com>
Thu, 27 Feb 2020 07:22:10 +0000 (08:22 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Feb 2020 19:16:14 +0000 (11:16 -0800)
commita549d929b9630b2fcdea858bfc2ab40ce6e6f118
tree3075f2442b89022be55f97c2e489beba3a05cf59
parent7e2e70979388a6e28ca20aa110dfef239492d465
mlx5: register lag notifier for init network namespace only

The current code causes problems when the unregistering netdevice could
be different then the registering one.

Since the check in mlx5_lag_netdev_event() does not allow any other
network namespace anyway, fix this by registerting the lag notifier
per init network namespace only.

Fixes: 54ef90606688 ("mlx5: Use dev_net netdevice notifier registrations")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Tested-by: Aya Levin <ayal@mellanox.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/lag.c
drivers/net/ethernet/mellanox/mlx5/core/lag.h
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h