]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
ASSERT(Frame->Mdl != NULL) before dereference
authorOwen Smith <owen.smith@cloud.com>
Wed, 10 Jan 2024 13:42:22 +0000 (13:42 +0000)
committerPaul Durrant <pdurrant@amazon.com>
Tue, 13 Feb 2024 15:32:56 +0000 (15:32 +0000)
CodeAnalysis detects a false positive, where Frame->Mdl could be NULL in
GnttabContract. Without asserting a non-NULL pointer, SDV will generate a
DVL log file that will fail WHQL testing.

Signed-off-by: Owen Smith <owen.smith@cloud.com>
src/xenbus/gnttab.c

index 4f6617b42cbf299c22fddad842238b9d23310f92..57c36df81c6a9b47e936b97fa3bfe585e19f6e71 100644 (file)
@@ -274,6 +274,7 @@ GnttabContract(
 
         Info("removed refrences [%08llx - %08llx]\n", Start, End);
 
+        ASSERT(Frame->Mdl != NULL);
         Pfn = MmGetMdlPfnArray(Frame->Mdl)[0];
 
         (VOID) MemoryRemoveFromPhysmap(Pfn);