From: Saravanan D <saravanand@crusoe.ai>
To: sashiko-reviews@lists.linux.dev
Cc: Saravanan D <saravanand@crusoe.ai>,
sashiko-bot@kernel.org, linux-nvme@lists.infradead.org,
kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, axboe@kernel.dk,
nilay@linux.ibm.com, dwagner@suse.de, sgogte@purestorage.com,
hare@kernel.org, hare@suse.de, linux-kernel@vger.kernel.org,
iyamahata@crusoe.ai, kiyer@crusoe.ai, ganbalagane@crusoe.ai,
sjpark@crusoe.ai, bchen@crusoe.ai
Subject: Re: [PATCH v7 1/2] nvme: add per-queue sysfs directories
Date: Wed, 4 Nov 2026 10:51:25 -0800 [thread overview]
Message-ID: <20261104185131.92361-1-saravanand@crusoe.ai> (raw)
In-Reply-To: <sashiko-outbox-197419@kernel.org>
On Wed, Nov 04, 2026 at 02:17:33PM +0000, sashiko-bot@kernel.org wrote:
[...]
> [Severity: Medium]
> If sysfs_create_groups() fails in nvme_add_queue_info() after
> kobject_init_and_add() has already published qinfo->kobj in sysfs,
> should the error path call kobject_del(&qinfo->kobj) before
> kobject_put(&qinfo->kobj), just like nvme_remove_queue_info() does?
I'm surprised this sequence went unnoticed in the previous versions of
this patch, since the error path has not changed since v5. My fault
injection runs used DEBUG_KOBJECT_RELEASE, which would have exposed the
directory left behind, but they set fail-nth on the task writing to
/dev/nvme-fabrics, and fail-nth only fails allocations made by that
task. nvme_tcp_setup_io_queues() starts each I/O queue from an async
worker, so nvme_add_queue_info() runs in a different task and none of
its allocations failed.
I will send a v8 that calls kobject_del() before kobject_put() once
kobject_init_and_add() has succeeded, so a failed sysfs_create_groups()
unlinks the <qid> directory before nvme_add_queue_info() returns, the
same way nvme_remove_queue_info() does.
I have also extended my own testing with a run that uses the failslab
stack filter to fail each allocation under nvme_add_queue_info() in
turn, including those made from the async workers. It checks that a
failed add leaves no queues/<qid> directory behind and that a controller
reset can add the same qid again. It fails on v7 and passes with the
fix.
Thanks,
Saravanan D.
next prev parent reply other threads:[~2026-11-04 18:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 14:06 [PATCH v7 0/2] nvme-tcp: allow setting per-queue io_cpu through sysfs Saravanan D
2026-11-04 14:06 ` [PATCH v7 1/2] nvme: add per-queue sysfs directories Saravanan D
2026-11-04 17:30 ` Daniel Wagner
2026-11-06 5:23 ` Saravanan D
[not found] ` <sashiko-outbox-197419@kernel.org>
2026-11-04 18:51 ` Saravanan D [this message]
2026-11-04 14:06 ` [PATCH v7 2/2] nvme-tcp: allow setting per-queue io_cpu through sysfs Saravanan D
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=20261104185131.92361-1-saravanand@crusoe.ai \
--to=saravanand@crusoe.ai \
--cc=axboe@kernel.dk \
--cc=bchen@crusoe.ai \
--cc=dwagner@suse.de \
--cc=ganbalagane@crusoe.ai \
--cc=hare@kernel.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=iyamahata@crusoe.ai \
--cc=kbusch@kernel.org \
--cc=kiyer@crusoe.ai \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=nilay@linux.ibm.com \
--cc=sagi@grimberg.me \
--cc=sashiko-bot@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sgogte@purestorage.com \
--cc=sjpark@crusoe.ai \
/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®