From: "王 颖杰" <x-professor@outlook.com>
To: "kbusch@kernel.org" <kbusch@kernel.org>,
"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "hch@lst.de" <hch@lst.de>, "sagi@grimberg.me" <sagi@grimberg.me>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"io-uring@vger.kernel.org" <io-uring@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"王 颖杰" <x-professor@outlook.com>
Subject: [PATCH 0/4] nvme: make passthrough user copyback failure-safe
Date: Fri, 16 Oct 2026 03:00:50 +0000 [thread overview]
Message-ID: <cover.1792118770.git.x-professor@outlook.com> (raw)
NVMe passthrough completion currently calls blk_rq_unmap_user() while
the completed request can still own a queue tag. A copyback page fault
that needs I/O from the same low-depth namespace can therefore wait for
the tag held by the request performing the copyback. The synchronous,
task-work, and local IOPOLL paths also discard copyback failures.
Release the request before synchronous and local-IOPOLL user copyback,
and propagate copyback failures through the ioctl or io_uring CQE when
there is no earlier command error. Keep nvme_passthru_end() based on the
real controller result rather than a later userspace-copy error.
With an NVMe I/O queue depth of two, a same-namespace file-backed
destination hung beyond 60 seconds before patch 1 and completed in 20/20
runs afterward. Unaligned PROT_NONE destinations returned false success
before the error-reporting changes and -EFAULT afterward. The local
IOPOLL test returned -EFAULT for all 1,280 commands, while writable
controls continued to succeed.
The series passed scripts/checkpatch.pl --strict, focused W=1 builds,
the full bzImage build used for the wider audit, and QEMU differential
tests on the affected completion paths.
Yingjie Wang (4):
nvme: release passthrough resources before user copyback
nvme: report synchronous passthrough copyback failures
nvme: report io_uring task-work copyback failures
nvme: harden local IOPOLL user copyback
drivers/nvme/host/ioctl.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
base-commit: 0fcb05b72344f40806cbe810de8872f1698bf053
--
2.43.0
next reply other threads:[~2026-10-16 3:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 3:00 王 颖杰 [this message]
2026-10-16 3:00 ` [PATCH 1/4] nvme: release passthrough resources before user copyback 王 颖杰
2026-10-16 3:00 ` [PATCH 2/4] nvme: report synchronous passthrough copyback failures 王 颖杰
2026-10-16 3:01 ` [PATCH 3/4] nvme: report io_uring task-work " 王 颖杰
2026-10-16 6:19 ` [PATCH 4/4] nvme: harden local IOPOLL user copyback 王 颖杰
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=cover.1792118770.git.x-professor@outlook.com \
--to=x-professor@outlook.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=io-uring@vger.kernel.org \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--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.