diff --git a/ntoskrnl/include/internal/ntoskrnl.h b/ntoskrnl/include/internal/ntoskrnl.h
index 5bb1b90f652..3aac321284e 100644
--- a/ntoskrnl/include/internal/ntoskrnl.h
+++ b/ntoskrnl/include/internal/ntoskrnl.h
@@ -6,6 +6,8 @@
 
 #ifdef _NTOSKRNL_
 
+#define DISABLE_SANITY_CHECKS_FOR_RELEASE
+
 #ifndef _ARM_
 #define KeGetCurrentThread  _KeGetCurrentThread
 #define KeGetPreviousMode   _KeGetPreviousMode
diff --git a/ntoskrnl/ke/timerobj.c b/ntoskrnl/ke/timerobj.c
index db39de11267..b2caaddc80b 100644
--- a/ntoskrnl/ke/timerobj.c
+++ b/ntoskrnl/ke/timerobj.c
@@ -207,7 +207,9 @@ KeCancelTimer(IN OUT PKTIMER Timer)
 {
     KIRQL OldIrql;
     BOOLEAN Inserted;
+#ifndef DISABLE_SANITY_CHECKS_FOR_RELEASE
     ASSERT_TIMER(Timer);
+#endif // DISABLE_SANITY_CHECKS_FOR_RELEASE
     ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL);
     DPRINT("KeCancelTimer(): Timer %p\n", Timer);
 
diff --git a/ntoskrnl/mm/ARM3/expool.c b/ntoskrnl/mm/ARM3/expool.c
index 301c5057de4..e49f3ef3142 100644
--- a/ntoskrnl/mm/ARM3/expool.c
+++ b/ntoskrnl/mm/ARM3/expool.c
@@ -2604,11 +2604,13 @@ ExFreePoolWithTag(IN PVOID P,
         if (TagToFree && TagToFree != Tag)
         {
             DPRINT1("Freeing pool - invalid tag specified: %.4s != %.4s\n", (char*)&TagToFree, (char*)&Tag);
+#ifndef DISABLE_SANITY_CHECKS_FOR_RELEASE
 #if DBG
             /* Do not bugcheck in case this is a big allocation for which we didn't manage to insert the tag */
             if (Tag != ' GIB')
                 KeBugCheckEx(BAD_POOL_CALLER, 0x0A, (ULONG_PTR)P, Tag, TagToFree);
 #endif
+#endif // DISABLE_SANITY_CHECKS_FOR_RELEASE
         }
 
         //
@@ -2690,9 +2692,11 @@ ExFreePoolWithTag(IN PVOID P,
     if (TagToFree && TagToFree != Tag)
     {
         DPRINT1("Freeing pool - invalid tag specified: %.4s != %.4s\n", (char*)&TagToFree, (char*)&Tag);
+#ifndef DISABLE_SANITY_CHECKS_FOR_RELEASE
 #if DBG
         KeBugCheckEx(BAD_POOL_CALLER, 0x0A, (ULONG_PTR)P, Tag, TagToFree);
 #endif
+#endif // DISABLE_SANITY_CHECKS_FOR_RELEASE
     }
 
     //
diff --git a/ntoskrnl/mm/ARM3/mdlsup.c b/ntoskrnl/mm/ARM3/mdlsup.c
index 1bd22c1e78a..7d86e0f2173 100644
--- a/ntoskrnl/mm/ARM3/mdlsup.c
+++ b/ntoskrnl/mm/ARM3/mdlsup.c
@@ -694,6 +694,7 @@ MmMapLockedPagesSpecifyCache(IN PMDL Mdl,
         PageCount = ADDRESS_AND_SIZE_TO_SPAN_PAGES(Base, Mdl->ByteCount);
         LastPage = MdlPages + PageCount;
 
+#ifndef DISABLE_SANITY_CHECKS_FOR_RELEASE
         //
         // Sanity checks
         //
@@ -701,6 +702,7 @@ MmMapLockedPagesSpecifyCache(IN PMDL Mdl,
                                  MDL_SOURCE_IS_NONPAGED_POOL |
                                  MDL_PARTIAL_HAS_BEEN_MAPPED)) == 0);
         ASSERT((Mdl->MdlFlags & (MDL_PAGES_LOCKED | MDL_PARTIAL)) != 0);
+#endif // DISABLE_SANITY_CHECKS_FOR_RELEASE
 
         //
         // Get the correct cache type
@@ -1647,11 +1649,13 @@ MmMapLockedPagesWithReservedMapping(
                                                Mdl->ByteCount);
     LastPage = MdlPages + PageCount;
 
+#ifndef DISABLE_SANITY_CHECKS_FOR_RELEASE
     // Sanity checks
     ASSERT((Mdl->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA |
                              MDL_SOURCE_IS_NONPAGED_POOL |
                              MDL_PARTIAL_HAS_BEEN_MAPPED)) == 0);
     ASSERT((Mdl->MdlFlags & (MDL_PAGES_LOCKED | MDL_PARTIAL)) != 0);
+#endif // DISABLE_SANITY_CHECKS_FOR_RELEASE
 
     // Get the correct cache type
     IsIoMapping = (Mdl->MdlFlags & MDL_IO_SPACE) != 0;
