[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 2/7] xeniface: Match the grant request identifier mode in queue lookups


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Rafał Wojdyła <omeg@xxxxxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 10 Nov 2026 19:34:49 +0100
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=fm3 header.d=invisiblethingslab.com header.i="@invisiblethingslab.com" header.h="Cc:Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=fm3 header.d=messagingengine.com header.i="@messagingengine.com" header.h="Cc:Content-Transfer-Encoding:Content-Type:Date:Feedback-ID:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To:X-ME-Proxy:X-ME-Sender"
  • Cc: Rafał Wojdyła <omeg@xxxxxxx>, Rafał Wojdyła <omeg@xxxxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 10 Nov 2026 18:36:05 +0000
  • Dkim2-signature: i=1; m=1; t=1794335761; d=invisiblethingslab.com; mf=PG9tZWdAaW52aXNpYmxldGhpbmdzbGFiLmNvbT4=; rt=PHdpbi1wdi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZz4=; s=fm3:rsa-sha256:Z7fh8t9ukRDGDgDCqbnthxGMv5hazdVWnTQWj7gbhekaONE JlCl2zXxDnba8ujas+ChiChaIX4UUVbbywcwNnpeId1IPRbiy/+/PYtrisr8Uumq fgvE3NR09l2dCicJnVOF8RZuhP4izKPK6Sru/up7p4e5IH9kkjryynKdLtxm1PkU 3+dgjvZZzyUe6GLza7OGkusVKHrpdyWCJnduRLwq8XkPho8u64MOd71gDUfChFzy vaZf+Le/9AWzam4W1qWfe+VSxoe5SYqfKoLjZ9KpIOOqDOe62SldhvrW6TRv9BhD bGMX0hsKovRao3UWAuQ/5bJA4WrXiSFZHBOhf9Q==;
  • Feedback-id: i409c4082:Fastmail
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Message-instance: m=1; h=sha256:Qb2XdegMNERfLKjRXLWqy5SPQq5xzpQP9mFdr6jnfB8=:VJSHX3Ht+3S1QuOSR5j6u10yalwKPAjve2JX7HA6Xdw=;

From: Rafał Wojdyła <omeg@xxxxxxx>

Require both requests to use the same identifier mode before comparing
their request IDs or user addresses. An address-based lookup must not
select or collide with a legacy request that happens to use the same address.

Assisted-by: LLM
Signed-off-by: Rafał Wojdyła <omeg@xxxxxxxxxxxxxxxxxxxxxx>
---
 src/xeniface/irp_queue.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/xeniface/irp_queue.c b/src/xeniface/irp_queue.c
index 511a36a..e2506b6 100644
--- a/src/xeniface/irp_queue.c
+++ b/src/xeniface/irp_queue.c
@@ -100,10 +100,10 @@ CsqPeekNextIrp(
 
             BOOL Match = TargetContext->Type == Context->Type &&
                          TargetContext->Process == Context->Process;
-            if (TargetContext->UseRequestId)
-                Match = Match &&
-                        TargetContext->UseRequestId == Context->UseRequestId &&
-                        TargetContext->RequestId == Context->RequestId;
+            if (TargetContext->UseRequestId != Context->UseRequestId)
+                Match = FALSE;
+            else if (TargetContext->UseRequestId)
+                Match = Match && (TargetContext->RequestId == 
Context->RequestId);
             else
                 Match = Match && (TargetContext->UserVa == Context->UserVa);
 
-- 
2.56.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.