From: Keith Busch <kbusch@kernel.org>
To: Nilay Shroff <nilay@linux.ibm.com>
Cc: linux-nvme@lists.infradead.org, hare@suse.de, hch@lst.de,
sagi@grimberg.me, dwagner@suse.de, kanie@linux.alibaba.com,
jmeneghi@redhat.com, randyj@purestorage.com,
martin.petersen@oracle.com, john.g.garry@oracle.com,
gjoyce@linux.ibm.com
Subject: Re: [PATCH v8 04/10] nvme-multipath: pass I/O type to nvme_find_path()
Date: Fri, 11 Sep 2026 16:38:46 -0600 [thread overview]
Message-ID: <aqSC9kxn5_MCJOPt@kbusch-mbp> (raw)
In-Reply-To: <20260815173502.1185929-5-nilay@linux.ibm.com>
On Sat, Aug 15, 2026 at 11:04:26PM +0530, Nilay Shroff wrote:
> @@ -804,12 +830,24 @@ long nvme_ns_head_chr_ioctl(struct file *file, unsigned int cmd,
> int nvme_ns_head_chr_uring_cmd(struct io_uring_cmd *ioucmd,
> unsigned int issue_flags)
> {
> + struct nvme_ns *ns;
> + unsigned int op_type;
> struct cdev *cdev = file_inode(ioucmd->file)->i_cdev;
> struct nvme_ns_head *head = container_of(cdev, struct nvme_ns_head, cdev);
> int srcu_idx = srcu_read_lock(&head->srcu);
> - struct nvme_ns *ns = nvme_find_path(head);
> int ret = -EINVAL;
> + const struct nvme_uring_cmd *cmd = io_uring_sqe128_cmd(ioucmd->sqe,
> + struct nvme_uring_cmd);
> + __u8 opcode = READ_ONCE(cmd->opcode);
Just fyi, the READ_ONCE is used because this is shared memory with user
space. We re-read the same field later when constructing the command, so
if the user does something tricky like changing that opcode, you can
have the wrong group for the command that actually gets dispatched.
next prev parent reply other threads:[~2026-09-11 22:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-15 17:34 [PATCH v8 00/10] nvme-multipath: introduce latency I/O policy Nilay Shroff
2026-08-15 17:34 ` [PATCH v8 01/10] block: expose blk_stat_{enable,disable}_accounting() to drivers Nilay Shroff
2026-08-15 17:34 ` [PATCH v8 02/10] block: record I/O request start time for passthru request Nilay Shroff
2026-08-15 17:34 ` [PATCH v8 03/10] block: support nesting for blk-mq flag QUEUE_FLAG_SAME_FORCE Nilay Shroff
2026-08-18 9:58 ` Hannes Reinecke
2026-08-18 11:59 ` Nilay Shroff
2026-08-19 13:51 ` Hannes Reinecke
2026-08-20 6:15 ` Nilay Shroff
2026-08-15 17:34 ` [PATCH v8 04/10] nvme-multipath: pass I/O type to nvme_find_path() Nilay Shroff
2026-09-11 22:38 ` Keith Busch [this message]
2026-09-12 10:22 ` Nilay Shroff
2026-08-15 17:34 ` [PATCH v8 05/10] nvme-multipath: add support for latency I/O policy Nilay Shroff
2026-08-15 17:34 ` [PATCH v8 06/10] nvme: add generic debugfs support Nilay Shroff
2026-08-15 17:34 ` [PATCH v8 07/10] nvme-multipath: add debugfs attribute latency_ewma_shift Nilay Shroff
2026-08-15 17:34 ` [PATCH v8 08/10] nvme-multipath: add debugfs attribute latency_batch_timeout Nilay Shroff
2026-08-15 17:34 ` [PATCH v8 09/10] nvme-multipath: add debugfs attribute latency_stat Nilay Shroff
2026-08-15 17:34 ` [PATCH v8 10/10] nvme-multipath: add documentation for latency I/O policy Nilay Shroff
2026-08-22 22:47 ` [PATCH v8 00/10] nvme-multipath: introduce " Sagi Grimberg
2026-08-25 5:05 ` Nilay Shroff
2026-08-30 21:53 ` Sagi Grimberg
2026-08-31 6:31 ` Nilay Shroff
2026-09-07 14:31 ` Hannes Reinecke
2026-09-08 17:06 ` Randy Jennings
2026-09-11 21:52 ` Sagi Grimberg
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=aqSC9kxn5_MCJOPt@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=dwagner@suse.de \
--cc=gjoyce@linux.ibm.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jmeneghi@redhat.com \
--cc=john.g.garry@oracle.com \
--cc=kanie@linux.alibaba.com \
--cc=linux-nvme@lists.infradead.org \
--cc=martin.petersen@oracle.com \
--cc=nilay@linux.ibm.com \
--cc=randyj@purestorage.com \
--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.