From: Sagi Grimberg <sagi@grimberg.me>
To: Daniel Wagner <dwagner@suse.de>, James Smart <james.smart@broadcom.com>
Cc: Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
Hannes Reinecke <hare@suse.de>,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/5] nvme-fabrics: introduce ref counting for nvmf_ctrl_options
Date: Thu, 7 Mar 2024 12:27:43 +0200 [thread overview]
Message-ID: <342cf4cf-ad14-4fd0-bcab-fe5fcecf4c0a@grimberg.me> (raw)
In-Reply-To: <20240221132404.6311-4-dwagner@suse.de>
On 21/02/2024 15:24, Daniel Wagner wrote:
> The FC transport is offloading the connect attempt to a workqueue. When
> the attempt fails the transport is starting to cleanup resources. It is
> possible for user space to trigger a crash because nvmf_ctrl_options are
> exposed to sysfs.
>
> This crash wasn't observed with blktests nvme/041 until now because the
> retry loop was usually trying for several times (e.g. with defaults
> 600s) and the test would trigger the cleanup itself. Though we the
> recent change not retrying to use invalid credentials the crash can be
> easily triggered.
>
> The simplest way to control the life time of nvmf_ctrl_options is by
> using ref counting.
Why do we need a refcount for an object that has the same exact lifetime
as the ctrl itself? It just feels like unneeded complication.
next prev parent reply other threads:[~2024-03-07 10:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 13:23 [PATCH v2 0/5] nvme-fc: fix blktests nvme/041 Daniel Wagner
2024-02-21 13:24 ` [PATCH v2 1/5] nvme-fc: rename free_ctrl callback to match name pattern Daniel Wagner
2024-02-21 15:52 ` Hannes Reinecke
2024-03-07 10:21 ` Sagi Grimberg
2024-02-21 13:24 ` [PATCH v2 2/5] nvme-fc: do not retry when auth fails or connection is refused Daniel Wagner
2024-02-21 15:53 ` Hannes Reinecke
2024-02-21 16:37 ` Daniel Wagner
2024-02-22 6:46 ` Hannes Reinecke
2024-02-22 7:45 ` Daniel Wagner
2024-02-22 17:02 ` Daniel Wagner
2024-02-23 11:58 ` Hannes Reinecke
2024-03-07 10:25 ` Sagi Grimberg
2024-03-07 12:43 ` Daniel Wagner
2024-02-21 13:24 ` [PATCH v2 3/5] nvme-fabrics: introduce ref counting for nvmf_ctrl_options Daniel Wagner
2024-02-21 15:54 ` Hannes Reinecke
2024-03-07 10:27 ` Sagi Grimberg [this message]
2024-03-11 17:36 ` Daniel Wagner
2024-03-11 19:28 ` Hannes Reinecke
2024-02-21 13:24 ` [PATCH v2 4/5] nvme-fc: reorder ctrl ref counting and cleanup code path Daniel Wagner
2024-02-21 13:24 ` [PATCH v2 5/5] nvme-fc: wait for initial connect attempt to finish Daniel Wagner
2024-03-07 10:33 ` Sagi Grimberg
2024-02-21 18:04 ` [PATCH v2 0/5] nvme-fc: fix blktests nvme/041 Keith Busch
2024-03-06 14:35 ` Daniel Wagner
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=342cf4cf-ad14-4fd0-bcab-fe5fcecf4c0a@grimberg.me \
--to=sagi@grimberg.me \
--cc=dwagner@suse.de \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.smart@broadcom.com \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®