Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1487502
| From | Salil Mehta <salil.mehta@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH V2 for-next 15/19] IB/hns: Cq has not been freed |
| Date | 2016-09-20 18:20 +0200 |
| Message-ID | <sjvW2-5lT-37@gated-at.bofh.it> (permalink) |
| References | <sjvMm-5fH-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Lijun Ou <oulijun@huawei.com>
Cq has not been freed when fail to ib_copy_to_udata, so need to
free it.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Peter Chen <luck.chen@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
drivers/infiniband/hw/hns/hns_roce_cq.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_cq.c b/drivers/infiniband/hw/hns/hns_roce_cq.c
index 3095f06..0973659 100644
--- a/drivers/infiniband/hw/hns/hns_roce_cq.c
+++ b/drivers/infiniband/hw/hns/hns_roce_cq.c
@@ -357,12 +357,15 @@ struct ib_cq *hns_roce_ib_create_cq(struct ib_device *ib_dev,
if (context) {
if (ib_copy_to_udata(udata, &hr_cq->cqn, sizeof(u64))) {
ret = -EFAULT;
- goto err_mtt;
+ goto err_cqc;
}
}
return &hr_cq->ib_cq;
+err_cqc:
+ hns_roce_free_cq(hr_dev, hr_cq);
+
err_mtt:
hns_roce_mtt_cleanup(hr_dev, &hr_cq->hr_buf.hr_mtt);
if (context)
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V2 for-next 00/19] IB/hns: Fixes for various misc. bugs Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:10 +0200 [PATCH V2 for-next 05/19] IB/hns: Remove unused parameter named qp_type Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:10 +0200 [PATCH V2 for-next 03/19] IB/hns: Fix bug of using uninit refcount and free Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:10 +0200 [PATCH V2 for-next 06/19] IB/hns: Fix bug of clear hem Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:10 +0200 [PATCH V2 for-next 11/19] IB/hns: Return bad wr while post send failed Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:20 +0200 [PATCH V2 for-next 13/19] IB/hns: Some items of qpc need to take user param Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:20 +0200 [PATCH V2 for-next 17/19] IB/hns: Fix the bug when platform_get_resource() exec fail Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:20 +0200 [PATCH V2 for-next 18/19] IB/hns: Delete the redundant lines in hns_roce_v1_m_qp() Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:20 +0200 [PATCH V2 for-next 12/19] IB/hns: The Ack timeout need a lower limit value Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:20 +0200 [PATCH V2 for-next 16/19] IB/hns: Update the rq head when modify qp state Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:20 +0200 [PATCH V2 for-next 10/19] IB/hns: Fix bug of memory leakage for registering user mr Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:20 +0200 [PATCH V2 for-next 02/19] IB/hns: Remove parameters of resize cq Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:20 +0200 [PATCH V2 for-next 01/19] IB/hns: Remove unused parameters in some functions Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:20 +0200 [PATCH V2 for-next 19/19] IB/hns: Fix for removal of redundant code Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:20 +0200 [PATCH V2 for-next 15/19] IB/hns: Cq has not been freed Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:20 +0200 [PATCH V2 for-next 14/19] IB/hns: Validate mtu when modified qp Salil Mehta <salil.mehta@huawei.com> - 2016-09-20 18:20 +0200 Re: [PATCH V2 for-next 00/19] IB/hns: Fixes for various misc. bugs Leon Romanovsky <leon@kernel.org> - 2016-09-22 15:40 +0200
csiph-web