Raise exception when MmMapLockedPagesSpecifyCache fails to map into UserMode.
authorGregor Anich <blight@blight.eu.org>
Sat, 5 Feb 2005 18:59:14 +0000 (18:59 +0000)
committerGregor Anich <blight@blight.eu.org>
Sat, 5 Feb 2005 18:59:14 +0000 (18:59 +0000)
svn path=/trunk/; revision=13425

reactos/ntoskrnl/mm/mdl.c

index 4fe1928..e3d7c2a 100644 (file)
@@ -862,8 +862,9 @@ MmMapLockedPagesSpecifyCache ( IN PMDL Mdl,
       }
       if (AccessMode == UserMode)
       {
-         /* FIXME: Raise an exception */
-         return NULL;
+         /* Throw exception */
+         ExRaiseStatus(STATUS_ACCESS_VIOLATION);
+         ASSERT(0);
       }
       else /* AccessMode == KernelMode */
       {
@@ -888,6 +889,8 @@ MmMapLockedPagesSpecifyCache ( IN PMDL Mdl,
       }
       Mdl->MappedSystemVa = (char*)Base + Mdl->ByteOffset;
    }
+   else
+      DPRINT1("UserMode mapping - returning 0x%x\n", (ULONG)Base + Mdl->ByteOffset);
 
    return((char*)Base + Mdl->ByteOffset);
 }