Commit in reactos/ntoskrnl/mm on MAIN
mm.c+11-41.69 -> 1.70
Fix MmIsAddressValid to check if VirtualAddress >= KERNEL_BASE

reactos/ntoskrnl/mm
mm.c 1.69 -> 1.70
diff -u -r1.69 -r1.70
--- mm.c	13 Mar 2004 19:14:15 -0000	1.69
+++ mm.c	8 Apr 2004 20:05:08 -0000	1.70
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: mm.c,v 1.69 2004/03/13 19:14:15 dwelch Exp $
+/* $Id: mm.c,v 1.70 2004/04/08 20:05:08 jfilby Exp $
  *
  * COPYRIGHT:   See COPYING in the top directory
  * PROJECT:     ReactOS kernel 
@@ -144,12 +144,19 @@
    MEMORY_AREA* MemoryArea;
    PMADDRESS_SPACE AddressSpace;
    
-   AddressSpace = &PsGetCurrentProcess()->AddressSpace;
+   if ((ULONG)VirtualAddress >= KERNEL_BASE)
+     {
+	AddressSpace = MmGetKernelAddressSpace();
+     }
+   else
+     {
+    AddressSpace = &PsGetCurrentProcess()->AddressSpace;
+     }
    
    MmLockAddressSpace(AddressSpace);
    MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace,
-					  VirtualAddress);
-
+                      VirtualAddress);
+   
    if (MemoryArea == NULL || MemoryArea->DeleteInProgress)
      {
 	MmUnlockAddressSpace(AddressSpace);
CVSspam 0.2.8