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

Commit 24be409b authored by Chuck Lever's avatar Chuck Lever Committed by Doug Ledford
Browse files

IB/mlx5: Return EINVAL when caller specifies too many SGEs



The returned value should be EINVAL, because it is caused by wrong
caller and not by internal overflow event.

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 20697434
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3758,7 +3758,7 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
		num_sge = wr->num_sge;
		if (unlikely(num_sge > qp->sq.max_gs)) {
			mlx5_ib_warn(dev, "\n");
			err = -ENOMEM;
			err = -EINVAL;
			*bad_wr = wr;
			goto out;
		}