[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] transmitter: Fix cleanup teardown in TransmitterInitialize
- To: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Owen Smith <owen.smith@xxxxxxxxxx>
- Date: Mon, 8 Jun 2026 09:14:30 +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=aI7xrE1b2tkjB1R3wSWoEcjHXYF48SJOiULHGBcX2gI=; b=D4M8JLVv4SaqkQzCh9T8p2zU8qelc/57QuvwdQh6je4tdco8Qbx3F9QIA1bCRBPa9r5GSJKS08uDlSBz5irz03pBY/eb2qPLSRJk6u9wY7LrUCTLfPdXRrKWnK4HbE+Ltst1UD2tHErQnSDQq3tnd7TL28jaXaLWOs0cJrUPmzs1EbR6dlBTzVg377dYlh3gd54NGqXop8EiW8KAFKN7vOdh2khZMbfMI+mKvIpYxJrJbPW90pylnlz/6HPhO/qHCmdTzaBi/AP1DPnq14Bzzoi5qOEOKWkfisolBTW77c6oSqkfWnazrqhGbVBrH7XU49cvmPy38lt0sqNCv95qYw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=R5xC3GkOJwP0baJc1V+u3e/CwFwvcP7NX8Mt5zJC/wZjgx6V0wbodcbcpVaoaL6X2c/wkySBwvnjy4jvexNOErQ0wS4saMVkEAmjp2+wYv9d/tGoSmmNP2VGvZwfqyopU4IrfEv6IAmgsJO0OVk5ENlS11YMZmDZI8IWQgHNXRGrbULjAxlyUkq/nXYW/AnFxJpEDVsn5bpemhSj4HNClL+bTfsvSN5PjCv/DFGMkEhgtMYyWepv2cCnoakXInrO7Qft+dfYtfWakR4f6x2oM+3ggcWIiJ1Occ4IP7bV6u9sOkJBv1EO9TmooXyx1zMkL+mD1TJ8eWPxFEr1e2k7Jw==
- 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: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Delivery-date: Mon, 08 Jun 2026 09:14:37 +0000
- List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
- Msip_labels:
- Thread-index: AQHc9co6v8m/1IRpZEaeCs26iZoIqLY0Ysba
- Thread-topic: [PATCH] transmitter: Fix cleanup teardown in TransmitterInitialize
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: 06 June 2026 4:35 PM
To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
Cc: Tu Dinh
Subject: [PATCH] transmitter: Fix cleanup teardown in TransmitterInitialize
Using "while (--Index > 0)" will miss tearing down the last ring.
Index is a signed LONG so using a >= 0 comparison is safe in this
context.
Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
---
src/xenvif/transmitter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c
index 88dfb60..41d0f3c 100644
--- a/src/xenvif/transmitter.c
+++ b/src/xenvif/transmitter.c
@@ -4615,7 +4615,7 @@ TransmitterInitialize(
fail7:
Error("fail7\n");
- while (--Index > 0) {
+ while (--Index >= 0) {
PXENVIF_TRANSMITTER_RING Ring = (*Transmitter)->Ring[Index];
(*Transmitter)->Ring[Index] = NULL;
--
2.54.0.windows.1
--
Ngoc Tu Dinh | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|