Message ID | 20180621173228.681FB2B8C8@smtp.opengridcomputing.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
On Thu, Jun 21, 2018 at 07:43:21AM -0700, Steve Wise wrote: > The code was mistakenly using the length of the page array memory instead > of the depth of the page array. > > Fixes: 8376b86de7d3 ("iw_cxgb4: Support the new memory registration API") > Cc: stable@vger.kernel.org > Signed-off-by: Steve Wise <swise@opengridcomputing.com> > --- > drivers/infiniband/hw/cxgb4/mem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to for-rc Thanks, Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c index 1445918e3239..7b76e6f81aeb 100644 --- a/drivers/infiniband/hw/cxgb4/mem.c +++ b/drivers/infiniband/hw/cxgb4/mem.c @@ -774,7 +774,7 @@ static int c4iw_set_page(struct ib_mr *ibmr, u64 addr) { struct c4iw_mr *mhp = to_c4iw_mr(ibmr); - if (unlikely(mhp->mpl_len == mhp->max_mpl_len)) + if (unlikely(mhp->mpl_len == mhp->attr.pbl_size)) return -ENOMEM; mhp->mpl[mhp->mpl_len++] = addr;
The code was mistakenly using the length of the page array memory instead of the depth of the page array. Fixes: 8376b86de7d3 ("iw_cxgb4: Support the new memory registration API") Cc: stable@vger.kernel.org Signed-off-by: Steve Wise <swise@opengridcomputing.com> --- drivers/infiniband/hw/cxgb4/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)