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

[PATCH 3/3] xenbus/cache: spill slabs on CacheFill failure to prevent pool leak


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: david ambu <david.preetham@xxxxxxxxxx>
  • Date: Thu, 10 Sep 2026 17:10:11 +0100
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=citrix.com header.i="@citrix.com" header.h="Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From"
  • Cc: david ambu <david.preetham@xxxxxxxxxx>
  • Delivery-date: Thu, 10 Sep 2026 16:13:04 +0000
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

Call CacheSpill on the fail path in CacheFill to release any slabs
already allocated before the failure, preventing a NonPagedPool leak.

Assisted-by: ClaudeCode:claude-sonnet-4-6
Signed-off-by: david ambu <david.preetham@xxxxxxxxxx>
---
 src/xenbus/cache.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/xenbus/cache.c b/src/xenbus/cache.c
index 90aea08..363bd29 100644
--- a/src/xenbus/cache.c
+++ b/src/xenbus/cache.c
@@ -906,6 +906,8 @@ fail5:
 fail4:
     Error("fail4\n");
 
+    CacheSpill(*Cache, 0);
+
 fail3:
     Error("fail3\n");
 
-- 
2.51.0.windows.1




 


Rackspace

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