lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF1ivSag+pbhRcNu+VmJYd5FmzwxZ==Ebge78TaZkXqKC-Sidg@mail.gmail.com>
Date:	Thu, 9 Jun 2016 14:54:16 -0700
From:	Ming Lin <mlin@...nel.org>
To:	Steve Wise <swise@...ngridcomputing.com>
Cc:	Sagi Grimberg <sagi@...htbits.io>, Christoph Hellwig <hch@....de>,
	Jens Axboe <axboe@...nel.dk>,
	Keith Busch <keith.busch@...el.com>,
	linux-nvme@...ts.infradead.org, linux-block@...r.kernel.org,
	lkml <linux-kernel@...r.kernel.org>,
	Armen Baloyan <armenx.baloyan@...el.com>,
	Jay Freyensee <james.p.freyensee@...el.com>,
	Ming Lin <ming.l@....samsung.com>, linux-rdma@...r.kernel.org
Subject: Re: [PATCH 4/5] nvmet-rdma: add a NVMe over Fabrics RDMA target driver

On Thu, Jun 9, 2016 at 2:42 PM, Steve Wise <swise@...ngridcomputing.com> 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ