Author: tfaber
Date: Fri Jun 15 07:27:45 2012
New Revision: 56737

URL: http://svn.reactos.org/svn/reactos?rev=56737&view=rev
Log:
[NTOSKRNL:MM]
- Do not ignore pool tag in ExFreePoolWithTag when freeing to a lookaside list

Modified:
    trunk/reactos/ntoskrnl/mm/ARM3/expool.c

Modified: trunk/reactos/ntoskrnl/mm/ARM3/expool.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/expool.c?rev=56737&r1=56736&r2=56737&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] Fri Jun 15 07:27:45 
2012
@@ -2151,6 +2151,15 @@
                          Entry->PoolType - 1);
 
     //
+    // Check block tag
+    //
+    if (TagToFree && TagToFree != Tag)
+    {
+        DPRINT1("Freeing pool - invalid tag specified: %.4s != %.4s\n", 
(char*)&TagToFree, (char*)&Tag);
+        KeBugCheckEx(BAD_POOL_CALLER, 0x0A, (ULONG_PTR)P, Tag, TagToFree);
+    }
+
+    //
     // Is this allocation small enough to have come from a lookaside list?
     //
     if (BlockSize <= MAXIMUM_PROCESSORS)
@@ -2201,15 +2210,6 @@
     OldIrql = ExLockPool(PoolDesc);
 
     //
-    // Check block tag
-    //
-    if (TagToFree && TagToFree != Entry->PoolTag)
-    {
-        DPRINT1("Freeing pool - invalid tag specified: %.4s != %.4s\n", 
(char*)&TagToFree, (char*)&Entry->PoolTag);
-        KeBugCheckEx(BAD_POOL_CALLER, 0x0A, (ULONG_PTR)P, Entry->PoolTag, 
TagToFree);
-    }
-
-    //
     // Check if the next allocation is at the end of the page
     //
     ExpCheckPoolBlocks(Entry);


Reply via email to