]> www.infradead.org Git - nvme.git/commitdiff
nvme/ioctl: don't warn on vectorized uring_cmd with fixed buffer
authorCaleb Sander Mateos <csander@purestorage.com>
Fri, 28 Mar 2025 15:46:45 +0000 (09:46 -0600)
committerKeith Busch <kbusch@kernel.org>
Mon, 31 Mar 2025 15:48:25 +0000 (08:48 -0700)
The vectorized io_uring NVMe passthru opcodes don't yet support fixed
buffers. But since userspace can trigger this condition based on the
io_uring SQE parameters, it shouldn't cause a kernel warning.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Fixes: 23fd22e55b76 ("nvme: wire up fixed buffer support for nvme passthrough")
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/ioctl.c

index ecf136489044ff3ac851a0f0bd26e8c4aa4b9ad2..f8174809684165887b7b517d8cf27e7ba5a56a5e 100644 (file)
@@ -142,7 +142,7 @@ static int nvme_map_user_request(struct request *req, u64 ubuffer,
                struct iov_iter iter;
 
                /* fixedbufs is only for non-vectored io */
-               if (WARN_ON_ONCE(flags & NVME_IOCTL_VEC)) {
+               if (flags & NVME_IOCTL_VEC) {
                        ret = -EINVAL;
                        goto out;
                }