diff options
author | Steve Wise <swise@opengridcomputing.com> | 2007-03-22 16:38:20 +0100 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-03-22 22:40:16 +0100 |
commit | d60134718820892853e8be7141ef7f6cdb455ea6 (patch) | |
tree | 0d0732387077636b0550207e618045cc279c0bfc | |
parent | IB/ipath: Check return value of lookup_one_len (diff) | |
download | linux-d60134718820892853e8be7141ef7f6cdb455ea6.tar.xz linux-d60134718820892853e8be7141ef7f6cdb455ea6.zip |
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>
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_provider.c | 5 |
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, php = to_iwch_pd(pd); if (mr_rereg_mask & IB_MR_REREG_ACCESS) mh.attr.perms = iwch_ib_to_tpt_access(acc); - if (mr_rereg_mask & IB_MR_REREG_TRANS) + if (mr_rereg_mask & IB_MR_REREG_TRANS) { ret = build_phys_page_list(buffer_list, num_phys_buf, iova_start, &total_size, &npages, &shift, &page_list); + if (ret) + return ret; + } ret = iwch_reregister_mem(rhp, php, &mh, shift, page_list, npages); kfree(page_list); |