* [PATCH wip/dl-for-next] RDMA/bnxt_re: Fix kbuild error
@ 2018-01-18 15:17 Devesh Sharma
[not found] ` <1516288665-11055-1-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Devesh Sharma @ 2018-01-18 15:17 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA, jgg-VPRAkNaXOzVWk0Htik3J/w
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Devesh Sharma
Fix for following build failure
drivers/infiniband/hw/bnxt_re/ib_verbs.c:3402:7-14: ERROR: reference
preceded by free on line 3375
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git wip/dl-for-next
head: d47f6fe6736ed3ecb39cd69fe26e3518f199eecd
commit: cb8a852e09c1dc8e47af741714063acf9c4d115c [3/28] RDMA/bnxt_re: Add support for MRs with Huge pages
:::::: branch date: 4 hours ago
:::::: commit date: 15 hours ago
>> drivers/infiniband/hw/bnxt_re/ib_verbs.c:3402:7-14: ERROR: reference preceded by free on line 3375
git remote add rdma-rdma https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git
git remote update rdma-rdma
git checkout cb8a852e09c1dc8e47af741714063acf9c4d115c
vim +3402 drivers/infiniband/hw/bnxt_re/ib_verbs.c
Signed-off-by: Devesh Sharma <devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
---
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 7220322..9b8fa77 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -3355,10 +3355,8 @@ int bnxt_re_dereg_mr(struct ib_mr *ib_mr)
int rc;
rc = bnxt_qplib_free_mrw(&rdev->qplib_res, &mr->qplib_mr);
- if (rc) {
+ if (rc)
dev_err(rdev_to_dev(rdev), "Dereg MR failed: %#x\n", rc);
- return rc;
- }
if (mr->pages) {
rc = bnxt_qplib_free_fast_reg_page_list(&rdev->qplib_res,
@@ -3421,7 +3419,7 @@ struct ib_mr *bnxt_re_alloc_mr(struct ib_pd *ib_pd, enum ib_mr_type type,
rc = bnxt_qplib_alloc_mrw(&rdev->qplib_res, &mr->qplib_mr);
if (rc)
- goto fail;
+ goto bail;
mr->ib_mr.lkey = mr->qplib_mr.lkey;
mr->ib_mr.rkey = mr->ib_mr.lkey;
@@ -3443,9 +3441,10 @@ struct ib_mr *bnxt_re_alloc_mr(struct ib_pd *ib_pd, enum ib_mr_type type,
return &mr->ib_mr;
fail_mr:
- bnxt_qplib_free_mrw(&rdev->qplib_res, &mr->qplib_mr);
-fail:
kfree(mr->pages);
+fail:
+ bnxt_qplib_free_mrw(&rdev->qplib_res, &mr->qplib_mr);
+bail:
kfree(mr);
return ERR_PTR(rc);
}
@@ -3595,22 +3594,20 @@ struct ib_mr *bnxt_re_reg_user_mr(struct ib_pd *ib_pd, u64 start, u64 length,
pbl_tbl = kcalloc(umem_pgs, sizeof(u64 *), GFP_KERNEL);
if (!pbl_tbl) {
rc = -ENOMEM;
- goto free_mrw;
+ goto free_umem;
}
page_shift = umem->page_shift;
if (!bnxt_re_page_size_ok(page_shift)) {
dev_err(rdev_to_dev(rdev), "umem page size unsupported!");
- kfree(pbl_tbl);
rc = -EFAULT;
- goto free_umem;
+ goto fail;
}
if (!umem->hugetlb && length > BNXT_RE_MAX_MR_SIZE_LOW) {
dev_err(rdev_to_dev(rdev), "Requested MR Sz:%llu Max sup:%llu",
length, (u64)BNXT_RE_MAX_MR_SIZE_LOW);
- kfree(pbl_tbl);
rc = -EINVAL;
goto fail;
}
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread[parent not found: <1516288665-11055-1-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>]
* Re: [PATCH wip/dl-for-next] RDMA/bnxt_re: Fix kbuild error [not found] ` <1516288665-11055-1-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> @ 2018-01-18 15:19 ` Devesh Sharma [not found] ` <CANjDDBgnhRuroVEfGJ=gF9=dS47w7pcQh5hZsF=p5iF6mxmX9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2018-01-18 19:15 ` Yuval Shaia 1 sibling, 1 reply; 5+ messages in thread From: Devesh Sharma @ 2018-01-18 15:19 UTC (permalink / raw) To: Doug Ledford, Jason Gunthorpe; +Cc: linux-rdma, Devesh Sharma Hello Doug, Please pull this in, hopefully this will fix the latest build failure on your sub tree. -Regards Devesh On Thu, Jan 18, 2018 at 8:47 PM, Devesh Sharma <devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> wrote: > Fix for following build failure > > drivers/infiniband/hw/bnxt_re/ib_verbs.c:3402:7-14: ERROR: reference > preceded by free on line 3375 > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git wip/dl-for-next > head: d47f6fe6736ed3ecb39cd69fe26e3518f199eecd > commit: cb8a852e09c1dc8e47af741714063acf9c4d115c [3/28] RDMA/bnxt_re: Add support for MRs with Huge pages > :::::: branch date: 4 hours ago > :::::: commit date: 15 hours ago > >>> drivers/infiniband/hw/bnxt_re/ib_verbs.c:3402:7-14: ERROR: reference preceded by free on line 3375 > > git remote add rdma-rdma https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git > git remote update rdma-rdma > git checkout cb8a852e09c1dc8e47af741714063acf9c4d115c > vim +3402 drivers/infiniband/hw/bnxt_re/ib_verbs.c > > Signed-off-by: Devesh Sharma <devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> > --- > drivers/infiniband/hw/bnxt_re/ib_verbs.c | 17 +++++++---------- > 1 file changed, 7 insertions(+), 10 deletions(-) > > diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c > index 7220322..9b8fa77 100644 > --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c > +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c > @@ -3355,10 +3355,8 @@ int bnxt_re_dereg_mr(struct ib_mr *ib_mr) > int rc; > > rc = bnxt_qplib_free_mrw(&rdev->qplib_res, &mr->qplib_mr); > - if (rc) { > + if (rc) > dev_err(rdev_to_dev(rdev), "Dereg MR failed: %#x\n", rc); > - return rc; > - } > > if (mr->pages) { > rc = bnxt_qplib_free_fast_reg_page_list(&rdev->qplib_res, > @@ -3421,7 +3419,7 @@ struct ib_mr *bnxt_re_alloc_mr(struct ib_pd *ib_pd, enum ib_mr_type type, > > rc = bnxt_qplib_alloc_mrw(&rdev->qplib_res, &mr->qplib_mr); > if (rc) > - goto fail; > + goto bail; > > mr->ib_mr.lkey = mr->qplib_mr.lkey; > mr->ib_mr.rkey = mr->ib_mr.lkey; > @@ -3443,9 +3441,10 @@ struct ib_mr *bnxt_re_alloc_mr(struct ib_pd *ib_pd, enum ib_mr_type type, > return &mr->ib_mr; > > fail_mr: > - bnxt_qplib_free_mrw(&rdev->qplib_res, &mr->qplib_mr); > -fail: > kfree(mr->pages); > +fail: > + bnxt_qplib_free_mrw(&rdev->qplib_res, &mr->qplib_mr); > +bail: > kfree(mr); > return ERR_PTR(rc); > } > @@ -3595,22 +3594,20 @@ struct ib_mr *bnxt_re_reg_user_mr(struct ib_pd *ib_pd, u64 start, u64 length, > pbl_tbl = kcalloc(umem_pgs, sizeof(u64 *), GFP_KERNEL); > if (!pbl_tbl) { > rc = -ENOMEM; > - goto free_mrw; > + goto free_umem; > } > > page_shift = umem->page_shift; > > if (!bnxt_re_page_size_ok(page_shift)) { > dev_err(rdev_to_dev(rdev), "umem page size unsupported!"); > - kfree(pbl_tbl); > rc = -EFAULT; > - goto free_umem; > + goto fail; > } > > if (!umem->hugetlb && length > BNXT_RE_MAX_MR_SIZE_LOW) { > dev_err(rdev_to_dev(rdev), "Requested MR Sz:%llu Max sup:%llu", > length, (u64)BNXT_RE_MAX_MR_SIZE_LOW); > - kfree(pbl_tbl); > rc = -EINVAL; > goto fail; > } > -- > 1.8.3.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CANjDDBgnhRuroVEfGJ=gF9=dS47w7pcQh5hZsF=p5iF6mxmX9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH wip/dl-for-next] RDMA/bnxt_re: Fix kbuild error [not found] ` <CANjDDBgnhRuroVEfGJ=gF9=dS47w7pcQh5hZsF=p5iF6mxmX9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2018-01-18 19:54 ` Doug Ledford [not found] ` <1516305246.3403.301.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Doug Ledford @ 2018-01-18 19:54 UTC (permalink / raw) To: Devesh Sharma, Jason Gunthorpe; +Cc: linux-rdma [-- Attachment #1: Type: text/plain, Size: 724 bytes --] On Thu, 2018-01-18 at 20:49 +0530, Devesh Sharma wrote: > Hello Doug, > > Please pull this in, hopefully this will fix the latest build failure > on your sub tree. > > -Regards > Devesh Hi Devesh, Given that the code had only landed in my wip/ area, I took your patch and squashed into the broken patch (which required a rebase) and then pushed a new branch (wip/dl-for-next-rebased). We'll see if it passes the tests there (it passed build tests on my local system the first time, so just have to wait for the 0day results). -- Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1516305246.3403.301.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH wip/dl-for-next] RDMA/bnxt_re: Fix kbuild error [not found] ` <1516305246.3403.301.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2018-01-19 5:15 ` Devesh Sharma 0 siblings, 0 replies; 5+ messages in thread From: Devesh Sharma @ 2018-01-19 5:15 UTC (permalink / raw) To: Doug Ledford; +Cc: Jason Gunthorpe, linux-rdma On Fri, Jan 19, 2018 at 1:24 AM, Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote: > On Thu, 2018-01-18 at 20:49 +0530, Devesh Sharma wrote: >> Hello Doug, >> >> Please pull this in, hopefully this will fix the latest build failure >> on your sub tree. >> >> -Regards >> Devesh > > Hi Devesh, > > Given that the code had only landed in my wip/ area, I took your patch > and squashed into the broken patch (which required a rebase) and then > pushed a new branch (wip/dl-for-next-rebased). We'll see if it passes > the tests there (it passed build tests on my local system the first > time, so just have to wait for the 0day results). Thanks Doug. > > -- > Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > GPG KeyID: B826A3330E572FDD > Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH wip/dl-for-next] RDMA/bnxt_re: Fix kbuild error [not found] ` <1516288665-11055-1-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 2018-01-18 15:19 ` Devesh Sharma @ 2018-01-18 19:15 ` Yuval Shaia 1 sibling, 0 replies; 5+ messages in thread From: Yuval Shaia @ 2018-01-18 19:15 UTC (permalink / raw) To: Devesh Sharma Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA, jgg-VPRAkNaXOzVWk0Htik3J/w, linux-rdma-u79uwXL29TY76Z2rM5mHXA On Thu, Jan 18, 2018 at 10:17:45AM -0500, Devesh Sharma wrote: > Fix for following build failure > > drivers/infiniband/hw/bnxt_re/ib_verbs.c:3402:7-14: ERROR: reference > preceded by free on line 3375 > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git wip/dl-for-next > head: d47f6fe6736ed3ecb39cd69fe26e3518f199eecd > commit: cb8a852e09c1dc8e47af741714063acf9c4d115c [3/28] RDMA/bnxt_re: Add support for MRs with Huge pages > :::::: branch date: 4 hours ago > :::::: commit date: 15 hours ago > > >> drivers/infiniband/hw/bnxt_re/ib_verbs.c:3402:7-14: ERROR: reference preceded by free on line 3375 > > git remote add rdma-rdma https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git > git remote update rdma-rdma > git checkout cb8a852e09c1dc8e47af741714063acf9c4d115c > vim +3402 drivers/infiniband/hw/bnxt_re/ib_verbs.c > > Signed-off-by: Devesh Sharma <devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> > --- > drivers/infiniband/hw/bnxt_re/ib_verbs.c | 17 +++++++---------- > 1 file changed, 7 insertions(+), 10 deletions(-) > > diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c > index 7220322..9b8fa77 100644 > --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c > +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c > @@ -3355,10 +3355,8 @@ int bnxt_re_dereg_mr(struct ib_mr *ib_mr) > int rc; > > rc = bnxt_qplib_free_mrw(&rdev->qplib_res, &mr->qplib_mr); > - if (rc) { > + if (rc) > dev_err(rdev_to_dev(rdev), "Dereg MR failed: %#x\n", rc); > - return rc; > - } > > if (mr->pages) { > rc = bnxt_qplib_free_fast_reg_page_list(&rdev->qplib_res, > @@ -3421,7 +3419,7 @@ struct ib_mr *bnxt_re_alloc_mr(struct ib_pd *ib_pd, enum ib_mr_type type, > > rc = bnxt_qplib_alloc_mrw(&rdev->qplib_res, &mr->qplib_mr); > if (rc) > - goto fail; > + goto bail; > > mr->ib_mr.lkey = mr->qplib_mr.lkey; > mr->ib_mr.rkey = mr->ib_mr.lkey; > @@ -3443,9 +3441,10 @@ struct ib_mr *bnxt_re_alloc_mr(struct ib_pd *ib_pd, enum ib_mr_type type, > return &mr->ib_mr; > > fail_mr: > - bnxt_qplib_free_mrw(&rdev->qplib_res, &mr->qplib_mr); > -fail: > kfree(mr->pages); > +fail: > + bnxt_qplib_free_mrw(&rdev->qplib_res, &mr->qplib_mr); > +bail: > kfree(mr); > return ERR_PTR(rc); > } > @@ -3595,22 +3594,20 @@ struct ib_mr *bnxt_re_reg_user_mr(struct ib_pd *ib_pd, u64 start, u64 length, > pbl_tbl = kcalloc(umem_pgs, sizeof(u64 *), GFP_KERNEL); > if (!pbl_tbl) { > rc = -ENOMEM; > - goto free_mrw; > + goto free_umem; > } > > page_shift = umem->page_shift; > > if (!bnxt_re_page_size_ok(page_shift)) { > dev_err(rdev_to_dev(rdev), "umem page size unsupported!"); > - kfree(pbl_tbl); > rc = -EFAULT; > - goto free_umem; > + goto fail; > } > > if (!umem->hugetlb && length > BNXT_RE_MAX_MR_SIZE_LOW) { > dev_err(rdev_to_dev(rdev), "Requested MR Sz:%llu Max sup:%llu", > length, (u64)BNXT_RE_MAX_MR_SIZE_LOW); > - kfree(pbl_tbl); > rc = -EINVAL; > goto fail; > } > -- > 1.8.3.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-01-19 5:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-18 15:17 [PATCH wip/dl-for-next] RDMA/bnxt_re: Fix kbuild error Devesh Sharma
[not found] ` <1516288665-11055-1-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2018-01-18 15:19 ` Devesh Sharma
[not found] ` <CANjDDBgnhRuroVEfGJ=gF9=dS47w7pcQh5hZsF=p5iF6mxmX9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-18 19:54 ` Doug Ledford
[not found] ` <1516305246.3403.301.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-19 5:15 ` Devesh Sharma
2018-01-18 19:15 ` Yuval Shaia
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox