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

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

Signed-off-by: default avatarBryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 0d6172a4
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment