aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2007-03-22 11:38:20 -0400
committerRoland Dreier <rolandd@cisco.com>2007-03-22 17:40:16 -0400
commitd60134718820892853e8be7141ef7f6cdb455ea6 (patch)
tree0d0732387077636b0550207e618045cc279c0bfc /drivers/infiniband/hw
parentfae8773b737d03f94ba83f0b78a891f385f35f98 (diff)
RDMA/cxgb3: Handle build_phys_page_list() failure in iwch_reregister_phys_mem()
Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_provider.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index f2774ae906bf..24e0df04f7db 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
@@ -545,11 +545,14 @@ static int iwch_reregister_phys_mem(struct ib_mr *mr,
545 php = to_iwch_pd(pd); 545 php = to_iwch_pd(pd);
546 if (mr_rereg_mask & IB_MR_REREG_ACCESS) 546 if (mr_rereg_mask & IB_MR_REREG_ACCESS)
547 mh.attr.perms = iwch_ib_to_tpt_access(acc); 547 mh.attr.perms = iwch_ib_to_tpt_access(acc);
548 if (mr_rereg_mask & IB_MR_REREG_TRANS) 548 if (mr_rereg_mask & IB_MR_REREG_TRANS) {
549 ret = build_phys_page_list(buffer_list, num_phys_buf, 549 ret = build_phys_page_list(buffer_list, num_phys_buf,
550 iova_start, 550 iova_start,
551 &total_size, &npages, 551 &total_size, &npages,
552 &shift, &page_list); 552 &shift, &page_list);
553 if (ret)
554 return ret;
555 }
553 556
554 ret = iwch_reregister_mem(rhp, php, &mh, shift, page_list, npages); 557 ret = iwch_reregister_mem(rhp, php, &mh, shift, page_list, npages);
555 kfree(page_list); 558 kfree(page_list);