public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: alan.adamson@oracle.com
To: Akinobu Mita <akinobu.mita@gmail.com>, chaitanyak@nvidia.com
Cc: linux-nvme@lists.infradead.org, Chaitanya Kulkarni <kch@nvidia.com>
Subject: Re: [PATCH] nvme: fix error handling in nvme_init_ctrl()
Date: Mon, 27 Mar 2023 15:12:38 -0700	[thread overview]
Message-ID: <cf2b63fe-2d92-66ae-2a4a-de7930cc87a2@oracle.com> (raw)
In-Reply-To: <20230327174406.10880-1-akinobu.mita@gmail.com>


On 3/27/23 10:44 AM, Akinobu Mita wrote:
> This fixes error handling when nvme_auth_init_ctrl() returns an error in
> nvme_init_ctrl().
>
> This problem is reproducible by blktests nvme/044.
> The nvme fault-injection debugfs directory was not removed after running
> the test.
>
> Reported-by: Chaitanya Kulkarni <kch@nvidia.com>
> Link: https://lore.kernel.org/linux-nvme/40baa75e-fdf5-cb73-5fa8-b12d65bce4e7@nvidia.com
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> ---
>   drivers/nvme/host/core.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 4eb62a7dac44..0545b3ea5a44 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -5197,6 +5197,7 @@ int nvme_init_ctrl(struct nvme_ctrl *ctrl, struct device *dev,
>   
>   	return 0;
>   out_free_cdev:
> +	nvme_fault_inject_fini(&ctrl->fault_inject);
>   	cdev_device_del(&ctrl->cdev, ctrl->device);
>   out_free_name:
>   	nvme_put_ctrl(ctrl);

Tested-by: Alan Adamson <alan.adamson@oracle.com>

Reviewed-by: Alan Adamson <alan.adamson@oracle.com>





  parent reply	other threads:[~2023-03-27 22:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23  8:18 debugfs message during creation of the NVMeOf controller Chaitanya Kulkarni
2023-03-24 22:34 ` alan.adamson
2023-03-26 23:44   ` Chaitanya Kulkarni
2023-03-26 23:48     ` Chaitanya Kulkarni
2023-03-27  5:27       ` Chaitanya Kulkarni
2023-03-27 17:44         ` [PATCH] nvme: fix error handling in nvme_init_ctrl() Akinobu Mita
2023-03-27 18:23           ` Chaitanya Kulkarni
2023-03-27 22:12           ` alan.adamson [this message]
2023-04-25  8:31         ` debugfs message during creation of the NVMeOf controller Yi Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf2b63fe-2d92-66ae-2a4a-de7930cc87a2@oracle.com \
    --to=alan.adamson@oracle.com \
    --cc=akinobu.mita@gmail.com \
    --cc=chaitanyak@nvidia.com \
    --cc=kch@nvidia.com \
    --cc=linux-nvme@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox