From: Daehyeon Ko <4ncienth@gmail.com>
To: Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>
Cc: Naman Jain <namjain@linux.microsoft.com>,
Saurabh Sengar <ssengar@linux.microsoft.com>,
Michael Kelley <mhklinux@outlook.com>,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] mshv_vtl: fix poll waitqueue handling
Date: Mon, 19 Oct 2026 17:43:47 +0900 [thread overview]
Message-ID: <cover.1792398881.git.4ncienth@gmail.com> (raw)
MSHV_SET_POLL_FILE retains one embedded wait entry per CPU after vfs_poll()
returns. Two independent bugs affect that state.
First, a provider such as signalfd may retire a non-file-owned waitqueue
with POLLFREE. The MSHV callback leaves its entry linked and retains the
queue pointer, allowing a later replacement to access freed provider
memory. Patch 1 detaches on POLLFREE and introduces an RCU-safe removal
helper.
Second, a poll callback may register more than one waitqueue. MSHV inserts
the same embedded list node into each queue, corrupting the first list.
Patch 2 rejects a second distinct queue and uses the common helper to
unwind the first registration.
The roots, triggers, effects, and runtime oracles remain independent.
Source-equivalent KASAN/LOCKDEP tests reproduced both bugs and validated
the fixes. The local system is not a Hyper-V VTL2 environment, so the
series has not been exercised through the real MSHV ioctl. OpenVMM does
not exercise these paths in its current use of the interface.
An LLM assisted the source audits, fix development, and validation. Each
patch notes that assistance in its changelog.
Changes in v2:
- combine the two previously standalone fixes into one series;
- rebase onto current Torvalds master;
- introduce the removal helper in patch 1 and reuse it in patch 2;
- replace the obsolete Assisted-by trailer with changelog prose.
Previous standalone submissions:
- POLLFREE v1: <20261017141527.623376-1-4ncienth@gmail.com>
- multi-waitqueue v2, now withdrawn:
<20261019070438.3732624-1-4ncienth@gmail.com>
Daehyeon Ko (2):
mshv_vtl: detach poll waiter on POLLFREE
mshv_vtl: reject poll files with multiple waitqueues
drivers/hv/mshv_vtl_main.c | 51 ++++++++++++++++++++++++++++++++++----
1 file changed, 46 insertions(+), 5 deletions(-)
base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
--
2.55.0
next reply other threads:[~2026-10-19 8:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 8:43 Daehyeon Ko [this message]
2026-10-19 8:43 ` [PATCH v2 1/2] mshv_vtl: detach poll waiter on POLLFREE Daehyeon Ko
2026-10-19 8:43 ` [PATCH v2 2/2] mshv_vtl: reject poll files with multiple waitqueues Daehyeon Ko
2026-10-19 9:07 ` [PATCH v2 0/2] mshv_vtl: fix poll waitqueue handling Naman Jain
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.1792398881.git.4ncienth@gmail.com \
--to=4ncienth@gmail.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhklinux@outlook.com \
--cc=namjain@linux.microsoft.com \
--cc=ssengar@linux.microsoft.com \
--cc=wei.liu@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®