On Thu, Jun 9, 2016 at 2:42 PM, Steve Wise <swise@xxxxxxxxxxxxxxxxxxxxx> wrote: > 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-block" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html