All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <kch@nvidia.com>
To: <linux-nvme@lists.infradead.org>
Cc: <hare@suse.de>, <kbusch@kernel.org>, <hch@lst.de>,
	<sagi@grimberg.me>, Chaitanya Kulkarni <kch@nvidia.com>
Subject: [PATCH V2 3/4] nvme-core: add missing fault-injection cleanup
Date: Fri, 28 Apr 2023 00:31:14 -0700	[thread overview]
Message-ID: <20230428073115.22987-4-kch@nvidia.com> (raw)
In-Reply-To: <20230428073115.22987-1-kch@nvidia.com>

Add missing fault-injection cleanup in nvme_init_ctrl() in the error
unwind path that also fixes following message for blktests:-

linux-block (for-next) # grep debugfs debugfs-err.log
[  147.853464] debugfs: Directory 'nvme1' with parent '/' already present!
[  147.853973] nvme1: failed to create debugfs attr
[  148.802490] debugfs: Directory 'nvme1' with parent '/' already present!
[  148.803244] nvme1: failed to create debugfs attr
[  148.877304] debugfs: Directory 'nvme1' with parent '/' already present!
[  148.877775] nvme1: failed to create debugfs attr
[  149.816652] debugfs: Directory 'nvme1' with parent '/' already present!
[  149.818011] nvme1: failed to create debugfs attr

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.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 42e90d00fc40..15607281baaa 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -5201,6 +5201,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);
-- 
2.40.0



  parent reply	other threads:[~2023-04-28  7:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28  7:31 [PATCH V2 0/4] nvme: init ctrl memleak and debugfs fix Chaitanya Kulkarni
2023-04-28  7:31 ` [PATCH V2 1/4] nvme-core: fix memory leak in dhchap_secret_store Chaitanya Kulkarni
2023-05-01 13:14   ` Sagi Grimberg
2023-04-28  7:31 ` [PATCH V2 2/4] nvme-core: fix memory leak in dhchap_ctrl_secret Chaitanya Kulkarni
2023-05-01 13:14   ` Sagi Grimberg
2023-04-28  7:31 ` Chaitanya Kulkarni [this message]
2023-05-01 13:14   ` [PATCH V2 3/4] nvme-core: add missing fault-injection cleanup Sagi Grimberg
2023-05-06  3:20   ` Yi Zhang
2023-04-28  7:31 ` [PATCH V2 4/4] nvme-core: fix dev_pm_qos memleak Chaitanya Kulkarni
2023-05-01 13:14   ` Sagi Grimberg
2023-05-06  3:14   ` Yi Zhang
2023-04-28  8:41 ` [PATCH V2 0/4] nvme: init ctrl memleak and debugfs fix Chaitanya Kulkarni
2023-05-12 20:29 ` Christoph Hellwig
2023-05-15 17:13 ` Keith Busch

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=20230428073115.22987-4-kch@nvidia.com \
    --to=kch@nvidia.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.