Re: [PATCH V2] nvme-rdma: fix double free in nvme_rdma_free_queue

From: jianchao.wang
Date: Thu May 17 2018 - 09:54:17 EST


Hi Max

Thanks for kindly review and suggestion for this.

On 05/16/2018 08:18 PM, Max Gurtovoy wrote:
> I don't know exactly what Christoph meant but IMO the best place to allocate it is in nvme_rdma_alloc_queue just before calling
>
> "set_bit(NVME_RDMA_Q_ALLOCATED, &queue->flags);"
>
> then you will never get to double free since we clear the NVME_RDMA_Q_ALLOCATED bit in the beginning of nvme_rdma_free_queue.

Yes, I will investigate the whether there is some special reason for async_event_sqe is not allocated in nvme_rdma_alloc_queue next.

Thanks
Jianchao