]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Fix free-at-wrong-IRQL bug
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 16 Dec 2014 11:07:00 +0000 (11:07 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Tue, 16 Dec 2014 11:07:00 +0000 (11:07 +0000)
The hash table code introduced for the FIFO EVTCHN ABI work tries to free
memory at HIGH IRQL. This causes a bugcheck when verifier is turned on. This
patch re-orders the unlock (which drops IRQL back to DISPATCH) and the free.

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

index b8e27d8732bfd43bca0c91215755075449045410..0cf10105da9cb5620dfa098b6a52cef1697517a3 100644 (file)
@@ -264,10 +264,11 @@ HashTableRemove(
 
 found:
     RemoveEntryList(ListEntry);
-    __HashTableFree(Node);
 
     HashTableBucketUnlock(Bucket, TRUE, Irql);
 
+    __HashTableFree(Node);
+
     return STATUS_SUCCESS;
 
 fail1: