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

Re: [PATCH 1/2] Check Process and UseRequestId in CsqPeekNextIrp


  • To: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Fri, 9 Oct 2026 11:35:39 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FOns39y/OCprrFbpEa3DJ0mHnkPM2c86xIKBZOK4upc=; b=nbbsinIk/vYjMM3jxR+T0lvnu0r3jYiCAuGvRiGe11/EcOcOzXGZC8E62Ns2sVlmht1CnbgjrVcx1g3UXh2o/KCiKUHNQRQqma3O9sRUoCnq4F8DikXLlYbYeK3kldg+TZuAhvcALAB4d1+j4yQ+YcyeTJEaeMUnKTOoKtA5HloSEtJtvY/Ub/A10dohkW7ccUZmmKvS5Uq8mFMvNLhgpcysB1ovDBV8fUVZWwCafgs+2YvkzGYi9awCyGGEW8lTA8EvAWJpQWIn7DCYzRULKF+kan7f/RBsMXA603mUxQbj/yPideitiYkvM0ms/s9ae19tA7nVAAsVNBtGTR2/bw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bqKNu7mYRhXPRVzbIceMNEn76cMm/x/4IiY8Pe35Ov2E/cArtj81DnlbOOxpkKa816LsopyiLPMMfsMdA1qhsHk8ris1Z1JuNzDmWtVdZDqByofyMhujGTbMaqXEQuQrMHo7TU0+FCR8J2r9tGp8psx2HPgqklZKZyzeU8GpovIaiWJsPEozsu121QnCj+fZmHvcQ50hiOHTY2O7EbHfhF4PGTAfnRqUClSfdFIPlARY/Ycg496llQtQtkoNyX8apWWi5CPsN8IvZrQ6kW3kUA7a1Ef1mxPToJAoAP54aWLcwpjhHpY7MG8nMDUgS5U48KgCnUGqykHP1KGHHEjL0Q==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
  • Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Delivery-date: Fri, 09 Oct 2026 11:36:10 +0000
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Msip_labels:
  • Thread-index: AQHdV+DtP3K2Yr2NmkK9ejqfWsEr77b1FMnE
  • Thread-topic: [PATCH 1/2] Check Process and UseRequestId in CsqPeekNextIrp

Reviewed-by: Owen Smith <owen.smith@xxxxxxxxxx>

________________________________________
From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> on behalf of Tu 
Dinh <ngoc-tu.dinh@xxxxxxxxxx>
Sent: 09 October 2026 12:25 PM
To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
Cc: Tu Dinh
Subject: [PATCH 1/2] Check Process and UseRequestId in CsqPeekNextIrp

Each Context object may be associated with a different process and a
different API (V1/V2). We must check for these settings when looking for
a matching IRP.

Assisted-by: LLM
Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
---
 src/xeniface/irp_queue.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/xeniface/irp_queue.c b/src/xeniface/irp_queue.c
index 420cecf..511a36a 100644
--- a/src/xeniface/irp_queue.c
+++ b/src/xeniface/irp_queue.c
@@ -98,9 +98,12 @@ CsqPeekNextIrp(
         if (PeekContext) {
             Context = NextIrp->Tail.Overlay.DriverContext[0];

-            BOOL Match = TargetContext->Type == Context->Type;
+            BOOL Match = TargetContext->Type == Context->Type &&
+                         TargetContext->Process == Context->Process;
             if (TargetContext->UseRequestId)
-                Match = Match && (TargetContext->RequestId == 
Context->RequestId);
+                Match = Match &&
+                        TargetContext->UseRequestId == Context->UseRequestId &&
+                        TargetContext->RequestId == Context->RequestId;
             else
                 Match = Match && (TargetContext->UserVa == Context->UserVa);

--
2.55.0.windows.3



--
Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech



 


Rackspace

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