]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/mlx5: Don't add slave port to unaffiliated list
authorLeon Romanovsky <leonro@nvidia.com>
Mon, 31 May 2021 16:04:44 +0000 (19:04 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:59:53 +0000 (16:59 +0200)
commitafd9e99b36bb2a1d6929779b9b310b82a72fd3ee
tree5455f11b135da74f58858a56094af894111bcd47
parent526f45aa90697d530b55d57137fa66e4928d2d1d
RDMA/mlx5: Don't add slave port to unaffiliated list

[ Upstream commit 7ce6095e3bff8e20ce018b050960b527e298f7df ]

The mlx5_ib_bind_slave_port() doesn't remove multiport device from the
unaffiliated list, but mlx5_ib_unbind_slave_port() did it. This unbalanced
flow caused to the situation where mlx5_ib_unaffiliated_port_list was
changed during iteration.

Fixes: 32f69e4be269 ("{net, IB}/mlx5: Manage port association for multiport RoCE")
Link: https://lore.kernel.org/r/2726e6603b1e6ecfe76aa5a12a063af72173bcf7.1622477058.git.leonro@nvidia.com
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/mlx5/main.c