[PATCH v3] nvme-tcp: Validate the queue state under the queue lock in the address attribute
Guixin Liu
kanie at linux.alibaba.com
Tue Oct 27 19:03:49 PDT 2026
在 2026/10/28 07:20, Keith Busch 写道:
> On Tue, Oct 27, 2026 at 08:39:50PM +0800, Guixin Liu wrote:
>> @@ -3035,6 +3048,14 @@ static struct nvme_tcp_ctrl *nvme_tcp_alloc_ctrl(struct device *dev,
>> goto out_free_ctrl;
>> }
>>
>> + /*
>> + * The queue locks are owned by the controller, not the queues:
>> + * they outlive the per-queue connect/disconnect cycles so that
>> + * sysfs readers can never race their destruction.
>> + */
>> + for (i = 0; i < ctrl->ctrl.queue_count; i++)
>> + mutex_init(&ctrl->queues[i].queue_lock);
>> +
> Could you rebase to the latest nvme-7.4 branch? There is already a loop
> happening here to initialize other fields in the queue.
Sure, I will do the rebase, changed in v4.
Best Regards,
Guixin Liu
More information about the Linux-nvme
mailing list