From 75f792014d27d8ee896a758fbc4bd17aacc18098 Mon Sep 17 00:00:00 2001 From: Gregor Anich Date: Sat, 5 Feb 2005 18:59:14 +0000 Subject: [PATCH] Raise exception when MmMapLockedPagesSpecifyCache fails to map into UserMode. svn path=/trunk/; revision=13425 --- reactos/ntoskrnl/mm/mdl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/mm/mdl.c b/reactos/ntoskrnl/mm/mdl.c index 4fe192864d4..e3d7c2a44de 100644 --- a/reactos/ntoskrnl/mm/mdl.c +++ b/reactos/ntoskrnl/mm/mdl.c @@ -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); }