From patchwork Tue Aug 9 14:16:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 1049722 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p79EGrex004239 for ; Tue, 9 Aug 2011 14:16:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751663Ab1HIOQj (ORCPT ); Tue, 9 Aug 2011 10:16:39 -0400 Received: from mgw2.diku.dk ([130.225.96.92]:57468 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751080Ab1HIOQj (ORCPT ); Tue, 9 Aug 2011 10:16:39 -0400 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id 3661519BC17; Tue, 9 Aug 2011 16:16:38 +0200 (CEST) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06811-10; Tue, 9 Aug 2011 16:16:32 +0200 (CEST) Received: from palace.topps.diku.dk (palace.ekstranet.diku.dk [192.38.115.202]) by mgw2.diku.dk (Postfix) with ESMTP id 230FA19BC13; Tue, 9 Aug 2011 16:16:32 +0200 (CEST) From: Julia Lawall To: Faisal Latif Cc: kernel-janitors@vger.kernel.org, Roland Dreier , Sean Hefty , Hal Rosenstock , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drivers/infiniband/hw/nes/nes_verbs.c: add missing calls to ib_umem_release Date: Tue, 9 Aug 2011 16:16:31 +0200 Message-Id: <1312899391-6619-1-git-send-email-julia@diku.dk> X-Mailer: git-send-email 1.7.1 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 09 Aug 2011 14:16:53 +0000 (UTC) From: Julia Lawall Add calls to ib_umem_release, as in the other error-handling code in the same function. Signed-off-by: Julia Lawall --- drivers/infiniband/hw/nes/nes_verbs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 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/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 9f2f7d4..394d0e7 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c @@ -2338,8 +2338,10 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, skip_pages = ((u32)region->offset) >> 12; - if (ib_copy_from_udata(&req, udata, sizeof(req))) + if (ib_copy_from_udata(&req, udata, sizeof(req))) { + ib_umem_release(region); return ERR_PTR(-EFAULT); + } nes_debug(NES_DBG_MR, "Memory Registration type = %08X.\n", req.reg_type); switch (req.reg_type) { @@ -2631,6 +2633,7 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, return &nesmr->ibmr; } + ib_umem_release(region); return ERR_PTR(-ENOSYS); }