[PATCH WIP/RFC v3 3/6] nvme_rdma: keep a ref on the ctrl during delete/flush
Sagi Grimberg
sagi at grimberg.me
Tue Aug 30 22:06:57 PDT 2016
>>> - /* Queue controller deletion */
>>> + /*
>>> + * Queue controller deletion. Keep a reference until all
>>> + * work is flushed since delete_work will free the ctrl mem
>>> + */
>>> + kref_get(&ctrl->ctrl.kref);
>>
>> kref_get_unless_zero?
>>
>
> At the top of nvme_rdma_device_unplug(), we change the ctrl state to DELETING.
> If that succeeded, and thus we own the delete process, and are about to kref the
> controller, how could the controller ref be 0? If it is, it is probably freed
> which means we're in a bad way...
I meant in the del_ctrl part...
More information about the Linux-nvme
mailing list