From: Caleb Sander Mateos Date: Fri, 28 Mar 2025 15:46:45 +0000 (-0600) Subject: nvme/ioctl: don't warn on vectorized uring_cmd with fixed buffer X-Git-Tag: v6.12.23~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3800b64f866c06c1f631de91a7e82880b8780eb;p=thirdparty%2Fkernel%2Fstable.git nvme/ioctl: don't warn on vectorized uring_cmd with fixed buffer [ Upstream commit eada75467fca0b016b9b22212637c07216135c20 ] 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 Reviewed-by: Jens Axboe Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Fixes: 23fd22e55b76 ("nvme: wire up fixed buffer support for nvme passthrough") Signed-off-by: Keith Busch Signed-off-by: Sasha Levin --- diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c index e4daac9c24401..a1b3c538a4bd2 100644 --- a/drivers/nvme/host/ioctl.c +++ b/drivers/nvme/host/ioctl.c @@ -141,7 +141,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; }