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

Commit 6ce73b07 authored by Robert Walsh's avatar Robert Walsh Committed by Roland Dreier
Browse files

IB/ipath: Check that a UD work request's address handle is valid

parent 0d6172a4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -308,6 +308,11 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr)
		goto bail;
	}

	if (wr->wr.ud.ah->pd != qp->ibqp.pd) {
		ret = -EPERM;
		goto bail;
	}

	/* IB spec says that num_sge == 0 is OK. */
	if (wr->num_sge > qp->s_max_sge) {
		ret = -EINVAL;