Message ID | 20190107144340.5348.90189.stgit@scvm10.sc.intel.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | IB/hfi1: Incorrect sizing of sge for PIO will OOPs | expand |
diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c index 14ddb75..d9c7175 100644 --- a/drivers/infiniband/hw/hfi1/verbs.c +++ b/drivers/infiniband/hw/hfi1/verbs.c @@ -1088,6 +1088,8 @@ int hfi1_verbs_send_pio(struct rvt_qp *qp, struct hfi1_pkt_state *ps, if (slen > len) slen = len; + if (slen > ss->sge.sge_length) + slen = ss->sge.sge_length; update_sge(ss, slen); seg_pio_copy_mid(pbuf, addr, slen); len -= slen;