From: sashiko-bot@kernel.org
To: "Michael Kelley" <mhkelley58@gmail.com>
Cc: linux-hyperv@vger.kernel.org
Subject: Re: [PATCH v2 4/6] drm_hyperv: Remove support for synth video protocol of old Hyper-V hosts
Date: Wed, 05 Aug 2026 20:48:31 +0000 [thread overview]
Message-ID: <20260805204832.430C81F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260805203751.2678-5-mhklinux@outlook.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing `reinit_completion()` and lack of transaction ID or message type verification causes data races and state machine corruption when VMBus requests time out and receive late responses.
--
--- Patch [4]: [PATCH v2 4/6] drm_hyperv: Remove support for synth video protocol of old Hyper-V hosts ---
commit d7a97b3cab0a3a58ec215d4c2c173f39a5e2648a
Author: Michael Kelley <mhkelley58@gmail.com>
drm_hyperv: Remove support for synth video protocol of old Hyper-V hosts
This commit removes support for synthetic video protocols from Hyper-V
hosts older than Windows 10. It replaces the version negotiation loop
with a single negotiation for the WIN10 version.
> diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_proto.c b/drivers/gpu/drm/hyperv/hyperv_drm_proto.c
> index f0ef627b4898a..1d09bba1efdd8 100644
> --- a/drivers/gpu/drm/hyperv/hyperv_drm_proto.c
> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_proto.c
[ ... ]
> @@ -581,11 +559,9 @@ int hv_drm_connect_vsp(struct hv_device *hdev)
>
> hv->screen_depth = SYNTHVID_DEPTH_WIN8;
>
> - if (hv_drm_version_ge(hv->synthvid_version, SYNTHVID_VERSION_WIN10)) {
> - ret = hv_drm_get_supported_resolution(hdev);
> - if (ret)
> - drm_err(dev, "Failed to get supported resolution from host, use default\n");
> - }
> + ret = hv_drm_get_supported_resolution(hdev);
> + if (ret)
> + drm_err(dev, "Failed to get supported resolution from host, use default\n");
[Severity: High]
This is a pre-existing issue, but if hv_drm_get_supported_resolution() times
out here, is it safe to proceed and ignore the error?
hv_drm_get_supported_resolution() issues a request via hv->init_buf and waits
using wait_for_completion_timeout(&hv->wait, ...). If a timeout occurs, the
error is logged but the driver initialization continues.
Later, if another VMBus request is made using the same shared hv->init_buf
(such as in hv_drm_update_vram_location()), a concurrently arriving late
response to the original resolution query could cause a data race:
hv_drm_receive_sub() would overwrite hv->init_buf via memcpy() while the new
request is being built, corrupting the outgoing message. It also signals
complete(&hv->wait), which could prematurely wake up the new request's wait
loop, falsely accepting the old response since transaction IDs aren't verified.
Does the driver need to reinitialize completions or discard late responses
after a timeout to prevent this state machine corruption?
>
> if (!hv->screen_width_max) {
> hv->screen_width_max = SYNTHVID_WIDTH_WIN8;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260805203751.2678-1-mhklinux@outlook.com?part=4
next prev parent reply other threads:[~2026-08-05 20:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 20:37 [PATCH v2 0/6] Remove support for Windows Server 2012/2012R2 & Win8/Win8.1 versions of Hyper-V Michael Kelley
2026-08-05 20:37 ` [PATCH v2 1/6] Drivers: hv: Remove support for WS2012/2012R2 & Win8/8.1 version " Michael Kelley
2026-08-05 20:58 ` sashiko-bot
2026-08-05 20:37 ` [PATCH v2 2/6] hv_sock: Remove check for old Hyper-V hosts Michael Kelley
2026-08-05 20:37 ` [PATCH v2 3/6] hv_netvsc: Remove GPADL teardown special case " Michael Kelley
2026-08-05 21:01 ` sashiko-bot
2026-08-05 20:37 ` [PATCH v2 4/6] drm_hyperv: Remove support for synth video protocol of " Michael Kelley
2026-08-05 20:48 ` sashiko-bot [this message]
2026-08-05 20:37 ` [PATCH v2 5/6] scsi: storvsc: Remove support for storvsc " Michael Kelley
2026-08-05 20:37 ` [PATCH v2 6/6] clocksource: hyper-v: Remove support for stimer interrupts in message mode Michael Kelley
2026-08-05 21:04 ` sashiko-bot
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=20260805204832.430C81F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=mhkelley58@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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