From: Sagi Grimberg <sagi@grimberg.me>
To: Daniel Wagner <dwagner@suse.de>, Hannes Reinecke <hare@suse.de>
Cc: Hannes Reinecke <hare@kernel.org>, Christoph Hellwig <hch@lst.de>,
Keith Busch <kbusch@kernel.org>,
linux-nvme@lists.infradead.org
Subject: Re: [PATCHv2] nvme: authentication error are always non-retryable
Date: Thu, 7 Mar 2024 12:37:18 +0200 [thread overview]
Message-ID: <01935bbe-02c1-413d-aef2-a228af5cdcbb@grimberg.me> (raw)
In-Reply-To: <22csajx7e5g6rwwhzsn5a5sq566jsigp2oqpqb7yewkqgemshu@4nnt2lt4277x>
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?
prev parent reply other threads:[~2024-03-07 10:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 8:06 [PATCHv2] nvme: authentication error are always non-retryable Hannes Reinecke
2024-02-26 10:24 ` Daniel Wagner
2024-02-26 10:36 ` Daniel Wagner
2024-02-26 10:54 ` Hannes Reinecke
2024-02-26 14:01 ` Daniel Wagner
2024-03-07 10:37 ` Sagi Grimberg [this message]
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=01935bbe-02c1-413d-aef2-a228af5cdcbb@grimberg.me \
--to=sagi@grimberg.me \
--cc=dwagner@suse.de \
--cc=hare@kernel.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--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