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

[PATCH 1/2] Remove ASSERT on CacheGet object allocation failure


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
  • Date: Tue, 28 Apr 2026 10:17:48 +0200
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Feedback-ID"
  • Cc: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>, Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Tue, 28 Apr 2026 08:18:01 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

When the grant table is exhausted, CacheGetObjectFromSlab can fail and
return NULL. Failing with an assert here prevents the grant exhaustion
from being handled elsewhere.

Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
---
 src/xenbus/cache.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/xenbus/cache.c b/src/xenbus/cache.c
index e61033d..e58e2f9 100644
--- a/src/xenbus/cache.c
+++ b/src/xenbus/cache.c
@@ -623,7 +623,6 @@ again:
         Slab = CONTAINING_RECORD(ListEntry, XENBUS_CACHE_SLAB, ListEntry);
 
         Object = CacheGetObjectFromSlab(Slab);
-        ASSERT(Object != NULL);
 
         //
         // If the slab is now fully occupied, ove the cursor on to the next
-- 
2.53.0.windows.2



--
 | Vates

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®.