Raise exception when MmMapLockedPagesSpecifyCache fails to map into UserMode.

svn path=/trunk/; revision=13425
This commit is contained in:
Gregor Anich 2005-02-05 18:59:14 +00:00
parent cb884ccdb4
commit 75f792014d

View file

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