All of lore.kernel.org
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: dennis.dalessandro@intel.com, mike.marciniszyn@intel.com,
	dledford@redhat.com, jgg@ziepe.ca
Cc: linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH -next] IB/qib: Add missing err handle for qib_user_sdma_rb_insert
Date: Fri, 21 Dec 2018 10:19:38 +0800	[thread overview]
Message-ID: <20181221021938.13784-1-yuehaibing@huawei.com> (raw)

It should goto err handle if qib_user_sdma_rb_insert fails,
other than success return.

Fixes: 67810e8c3c01 ("RDMA/qib: Remove all occurrences of BUG_ON()")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/infiniband/hw/qib/qib_user_sdma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/infiniband/hw/qib/qib_user_sdma.c b/drivers/infiniband/hw/qib/qib_user_sdma.c
index 31c523b..e87c0a7 100644
--- a/drivers/infiniband/hw/qib/qib_user_sdma.c
+++ b/drivers/infiniband/hw/qib/qib_user_sdma.c
@@ -237,6 +237,8 @@ qib_user_sdma_queue_create(struct device *dev, int unit, int ctxt, int sctxt)
 
 		ret = qib_user_sdma_rb_insert(&qib_user_sdma_rb_root,
 					sdma_rb_node);
+		if (ret == 0)
+			goto err_rb;
 	}
 	pq->sdma_rb_node = sdma_rb_node;
 
-- 
2.7.0

WARNING: multiple messages have this Message-ID (diff)
From: YueHaibing <yuehaibing@huawei.com>
To: <dennis.dalessandro@intel.com>, <mike.marciniszyn@intel.com>,
	<dledford@redhat.com>, <jgg@ziepe.ca>
Cc: <linux-kernel@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
	YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH -next] IB/qib: Add missing err handle for qib_user_sdma_rb_insert
Date: Fri, 21 Dec 2018 10:19:38 +0800	[thread overview]
Message-ID: <20181221021938.13784-1-yuehaibing@huawei.com> (raw)

It should goto err handle if qib_user_sdma_rb_insert fails,
other than success return.

Fixes: 67810e8c3c01 ("RDMA/qib: Remove all occurrences of BUG_ON()")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/infiniband/hw/qib/qib_user_sdma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/infiniband/hw/qib/qib_user_sdma.c b/drivers/infiniband/hw/qib/qib_user_sdma.c
index 31c523b..e87c0a7 100644
--- a/drivers/infiniband/hw/qib/qib_user_sdma.c
+++ b/drivers/infiniband/hw/qib/qib_user_sdma.c
@@ -237,6 +237,8 @@ qib_user_sdma_queue_create(struct device *dev, int unit, int ctxt, int sctxt)
 
 		ret = qib_user_sdma_rb_insert(&qib_user_sdma_rb_root,
 					sdma_rb_node);
+		if (ret == 0)
+			goto err_rb;
 	}
 	pq->sdma_rb_node = sdma_rb_node;
 
-- 
2.7.0



             reply	other threads:[~2018-12-21  2:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-21  2:19 YueHaibing [this message]
2018-12-21  2:19 ` [PATCH -next] IB/qib: Add missing err handle for qib_user_sdma_rb_insert YueHaibing
2019-01-02 17:12 ` Jason Gunthorpe
2019-01-02 18:40   ` Leon Romanovsky
2019-01-02 19:07     ` Jason Gunthorpe
2019-01-02 19:22       ` Leon Romanovsky
2019-01-04  6:08         ` YueHaibing
2019-01-04  6:08           ` YueHaibing
2019-01-03  2:05       ` YueHaibing
2019-01-03  2:05         ` YueHaibing
2019-01-04 18:39 ` Marciniszyn, Mike
2019-01-04 22:38   ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181221021938.13784-1-yuehaibing@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mike.marciniszyn@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.