Thread (11 messages) 11 messages, 6 authors, 2016-06-15

Re: [PATCH 4/5] nvmet-rdma: add a NVMe over Fabrics RDMA target driver

From: Ming Lin <hidden>
Date: 2016-06-09 21:54:24
Also in: linux-block, linux-nvme, lkml

Possibly related (same subject, not in this thread)

On Thu, Jun 9, 2016 at 2:42 PM, Steve Wise [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Should the above error path actually goto a block that frees the rsps?  Like
this?
diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c
index c184ee5..8aaa36f 100644
--- a/drivers/nvme/target/rdma.c
+++ b/drivers/nvme/target/rdma.c
@@ -1053,7 +1053,7 @@ nvmet_rdma_alloc_queue(struct nvmet_rdma_device *ndev,
                                !queue->host_qid);
                if (IS_ERR(queue->cmds)) {
                        ret = NVME_RDMA_CM_NO_RSC;
-                       goto out_free_cmds;
+                       goto out_free_responses;
                }
        }
@@ -1073,6 +1073,8 @@ out_free_cmds:
                                queue->recv_queue_size,
                                !queue->host_qid);
        }
+out_free_responses:
+        nvmet_rdma_free_rsps(queue);
 out_ida_remove:
        ida_simple_remove(&nvmet_rdma_queue_ida, queue->idx);
 out_destroy_sq:
Yes. Nice catch.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help