Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9bfea99 authored by Guy Levi's avatar Guy Levi Committed by Doug Ledford
Browse files

IB/mlx4: Check that reserved fields in mlx4_ib_create_qp_rss are zero



According to mlx4 convention, need to fail the command due to a non-zero
value in the user data which is expected to be zero.

Fixes: 3078f5f1 ("IB/mlx4: Add support for RSS QP")
Signed-off-by: default avatarGuy Levi <guyle@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent b23673f8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -812,6 +812,9 @@ static struct ib_qp *_mlx4_ib_create_qp_rss(struct ib_pd *pd,
		return ERR_PTR(-EFAULT);
	}

	if (memchr_inv(ucmd.reserved, 0, sizeof(ucmd.reserved)))
		return ERR_PTR(-EOPNOTSUPP);

	if (ucmd.comp_mask || ucmd.reserved1)
		return ERR_PTR(-EOPNOTSUPP);