Message ID | 20181128181931.30921.39337.stgit@scvm10.sc.intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | dbc2970caef74e8ff41923d302aa6fb5a4812d0e |
Delegated to: | Jason Gunthorpe |
Headers | show |
Series | IB/hfi1: Random fixes for driver to land in for-next | expand |
diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c index a365089..b7257d7 100644 --- a/drivers/infiniband/hw/hfi1/verbs.c +++ b/drivers/infiniband/hw/hfi1/verbs.c @@ -919,6 +919,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; rvt_update_sge(ss, slen, false); seg_pio_copy_mid(pbuf, addr, slen); len -= slen;