]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/commitdiff
Allow FrontendIncrementStatistic() to be called at < DISPATCH_LEVEL
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 18 Sep 2018 13:34:23 +0000 (14:34 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Tue, 18 Sep 2018 13:53:10 +0000 (14:53 +0100)
Swap the ASSERTion for a KeRaiseIrql().

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenvif/frontend.c

index 994935760b3a8715b0f8afc9980685c9c220b00e..142b2d457003968cc30808462666222c7b81337d 100644 (file)
@@ -1634,10 +1634,11 @@ FrontendIncrementStatistic(
 {
     ULONG                       Index;
     PXENVIF_FRONTEND_STATISTICS Statistics;
+    KIRQL                       Irql;
 
     ASSERT(Name < XENVIF_VIF_STATISTIC_COUNT);
 
-    ASSERT3U(KeGetCurrentIrql(), ==, DISPATCH_LEVEL);
+    KeRaiseIrql(DISPATCH_LEVEL, &Irql);
 
     Index = KeGetCurrentProcessorNumberEx(NULL);
 
@@ -1645,6 +1646,8 @@ FrontendIncrementStatistic(
     Statistics = &Frontend->Statistics[Index];
 
     Statistics->Value[Name] += Delta;
+
+    KeLowerIrql(Irql);
 }
 
 static FORCEINLINE const CHAR *