[PATCHv2] nvme: authentication error are always non-retryable

Sagi Grimberg sagi at grimberg.me
Thu Mar 7 02:37:18 PST 2024



On 26/02/2024 16:01, Daniel Wagner wrote:
> On Mon, Feb 26, 2024 at 11:54:13AM +0100, Hannes Reinecke wrote:
>> Maybe this?
> nvme_uninit_ctrl already puts the ref, thus the nvme_put_ctrl in
> nvme_loop_create_crtl is one too much:
>
> diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
> index de2ff7ed0657..bcda781e52f2 100644
> --- a/drivers/nvme/target/loop.c
> +++ b/drivers/nvme/target/loop.c
> @@ -615,7 +615,6 @@ static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev,
>          kfree(ctrl->queues);
>   out_uninit_ctrl:
>          nvme_uninit_ctrl(&ctrl->ctrl);
> -       nvme_put_ctrl(&ctrl->ctrl);

Are you sure this does not cause a leak in some cases?



More information about the Linux-nvme mailing list