mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
RDMA/mlx4: Return missed an error if device doesn't support steering
[ Upstream commitf4e56ec445] The error flow fixed in this patch is not possible because all kernel users of create QP interface check that device supports steering before set IB_QP_CREATE_NETIF_QP flag. Fixes:c1c9850112("IB/mlx4: Add support for steerable IB UD QPs") Link: https://lore.kernel.org/r/91c61f6e60eb0240f8bbc321fda7a1d2986dd03c.1634023677.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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
09cc73bbc1
commit
4d3092fe9a
@@ -773,8 +773,10 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd,
|
||||
if (dev->steering_support ==
|
||||
MLX4_STEERING_MODE_DEVICE_MANAGED)
|
||||
qp->flags |= MLX4_IB_QP_NETIF;
|
||||
else
|
||||
else {
|
||||
err = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(&backup_cap, &init_attr->cap, sizeof(backup_cap));
|
||||
|
||||
Reference in New Issue
Block a user