[PATCH v3 3/3] nvme-rdma: Handle number of queue changes

Sagi Grimberg sagi at grimberg.me
Tue Aug 30 01:21:24 PDT 2022


>> On Mon, Aug 29, 2022 at 05:22:50PM +0800, Chao Leng wrote:
>>>> +    ret = nvme_rdma_start_io_queues(ctrl, nr_queues,
>>>> +                    ctrl->tag_set.nr_hw_queues + 1);
>>>> +    if (ret)
>>>> +        goto out_wait_freeze_timed_out;
>>> nvme_rdma_start_io_queues(ctrl, 1, nr_queues) need to clean.
>>
>> the teardown path in nvme_rdma_stop_io_queus() is using
>>
>>     test_and_clear_bit(NVME_RDMA_Q_LIVE, &queue->flags)
>>
>> when iterating over all nr_hw_queues.
> I mean that we need realloc the ctrl->queues for
> nvme_rdma_start_io_queues(ctrl, 1, nr_queues).
> Otherwise, unallocated memory will be accessed when
> the new queue_count is bigger than the old one.

That can't happen. ctrl->queues is allocated at the start
of the controller lifetime and will never exceed this queue
count.



More information about the Linux-nvme mailing list