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

jianchao.wang jianchao.w.wang at oracle.com
Thu May 17 07:50:13 PDT 2018


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



More information about the Linux-nvme mailing list