From b81d71cff3bbe7d883598dbcd7d93b53b057a1c1 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Fri, 15 Jun 2012 07:27:45 +0000 Subject: [PATCH] [NTOSKRNL:MM] - Do not ignore pool tag in ExFreePoolWithTag when freeing to a lookaside list svn path=/trunk/; revision=56737 --- reactos/ntoskrnl/mm/ARM3/expool.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/reactos/ntoskrnl/mm/ARM3/expool.c b/reactos/ntoskrnl/mm/ARM3/expool.c index ff1b2b2998f..032f4b7fcad 100644 --- a/reactos/ntoskrnl/mm/ARM3/expool.c +++ b/reactos/ntoskrnl/mm/ARM3/expool.c @@ -2150,6 +2150,15 @@ ExFreePoolWithTag(IN PVOID P, BlockSize * POOL_BLOCK_SIZE, 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? // @@ -2200,15 +2209,6 @@ ExFreePoolWithTag(IN PVOID P, // 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 //