From: Keith Busch <kbusch@kernel.org>
To: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
Cc: linux-nvme@lists.infradead.org, axboe@kernel.dk, hch@lst.de,
sagi@grimberg.me, hare@kernel.org, sgogte@purestorage.com,
wagi@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nvme-tcp: fix NULL queue->ctrl dereference on reconnect
Date: Tue, 27 Oct 2026 19:48:05 -0600 [thread overview]
Message-ID: <auFUVXscufZffXyK@kbusch-mbp> (raw)
In-Reply-To: <20261028002654.1077190-1-christian.aurichzm@gmail.com>
On Tue, Oct 27, 2026 at 09:26:54PM -0300, Christian Aurich Zanettini Martins wrote:
> +static void nvme_tcp_init_queue(struct nvme_tcp_ctrl *ctrl, int qid)
> +{
> + struct nvme_tcp_queue *queue = &ctrl->queues[qid];
> +
> + queue->ctrl = ctrl;
> + mutex_init(&queue->pf_cache_lock);
> + queue->hdr_digest = ctrl->ctrl.opts->hdr_digest;
> + queue->data_digest = ctrl->ctrl.opts->data_digest;
It's a good start, but if we're introducing an init helper, let's take
it all the way! The queue_lock at least is something Guixin has in a
conflicting patch here:
https://lore.kernel.org/linux-nvme/20261027123950.3122316-1-kanie@linux.alibaba.com/
Other fields including io_work and send_mutex look safe to move here too.
prev parent reply other threads:[~2026-10-28 1:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 0:26 Christian Aurich Zanettini Martins
2026-10-28 1:48 ` Keith Busch [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=auFUVXscufZffXyK@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=christian.aurichzm@gmail.com \
--cc=hare@kernel.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
--cc=sgogte@purestorage.com \
--cc=wagi@kernel.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®