From: Naman Jain <namjain@linux.microsoft.com>
To: Daehyeon Ko <4ncienth@gmail.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>
Cc: Saurabh Sengar <ssengar@linux.microsoft.com>,
Michael Kelley <mhklinux@outlook.com>,
Roman Kisel <romank@linux.microsoft.com>,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mshv_vtl: reject poll files with multiple waitqueues
Date: Mon, 19 Oct 2026 10:40:11 +0530 [thread overview]
Message-ID: <b88b0341-a732-41e1-87df-4f0503df39cc@linux.microsoft.com> (raw)
In-Reply-To: <20261016061114.1686153-1-4ncienth@gmail.com>
On 10/16/2026 11:41 AM, Daehyeon Ko wrote:
> MSHV_SET_POLL_FILE invokes a file descriptor poll callback with a poll
> table backed by a single embedded wait entry. A poll callback may,
> however, register the table with more than one waitqueue. pipe_poll()
> does this naturally for an O_RDWR FIFO.
>
> The second registration currently warns but then inserts the same list
> node into another list. The new insertion overwrites the entry links while
> the first waitqueue still points at it, corrupting the first waitqueue and
> causing an invalid callback traversal when that queue wakes.
>
> Reject a second distinct waitqueue, remove the first registration, and
> return -EINVAL from the ioctl. Repeated registration of the same waitqueue
> is treated as a no-op. A rejected replacement leaves the CPU slot
> unregistered, consistent with the existing remove-before-register ordering.
> Single-waitqueue users such as the OpenHCL io_uring poll file keep their
> existing behavior.
>
> Fixes: 7bfe3b8ea6e3 ("Drivers: hv: Introduce mshv_vtl driver")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
This tag is no longer valid on latest linux-next tip and gives
checkpatch error.
Code changes LGTM.
> Signed-off-by: Daehyeon Ko <4ncienth@gmail.com>
> ---
> drivers/hv/mshv_vtl_main.c | 24 ++++++++++++++++++++++--
> 1 file changed, 22 insertions(+), 2 deletions(-)
>
Regards,
Naman
next prev parent reply other threads:[~2026-10-19 5:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 6:11 Daehyeon Ko
2026-10-19 5:10 ` Naman Jain [this message]
2026-10-19 7:04 ` [PATCH v2] " Daehyeon Ko
2026-10-19 7:34 ` Daehyeon Ko
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=b88b0341-a732-41e1-87df-4f0503df39cc@linux.microsoft.com \
--to=namjain@linux.microsoft.com \
--cc=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=romank@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®