[ros-diffs] [hbirr] 15558: Don't try to resolve user mode page faults in the very early boot phase.

hbirr at svn.reactos.com hbirr at svn.reactos.com
Sat May 28 09:32:24 CEST 2005


Don't try to resolve user mode page faults in the very early boot phase.
Modified: trunk/reactos/ntoskrnl/mm/mm.c
  _____  

Modified: trunk/reactos/ntoskrnl/mm/mm.c
--- trunk/reactos/ntoskrnl/mm/mm.c	2005-05-28 07:26:38 UTC (rev
15557)
+++ trunk/reactos/ntoskrnl/mm/mm.c	2005-05-28 07:32:23 UTC (rev
15558)
@@ -193,12 +193,12 @@

 
    if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
    {
-      DbgPrint("Page fault at high IRQL was %d\n", KeGetCurrentIrql());
+      CPRINT("Page fault at high IRQL was %d\n", KeGetCurrentIrql());
       return(STATUS_UNSUCCESSFUL);
    }
    if (PsGetCurrentProcess() == NULL)
    {
-      DbgPrint("No current process\n");
+      CPRINT("No current process\n");
       return(STATUS_UNSUCCESSFUL);
    }
 
@@ -316,7 +316,7 @@
 
    if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
    {
-      DbgPrint("Page fault at high IRQL was %d\n", KeGetCurrentIrql());
+      CPRINT("Page fault at high IRQL was %d, address %x\n",
KeGetCurrentIrql(), Address);
       return(STATUS_UNSUCCESSFUL);
    }
    if (PsGetCurrentProcess() == NULL)
@@ -324,8 +324,11 @@
       /* Allow this! It lets us page alloc much earlier! It won't be
needed 
        * after my init patch anyways
        */
-      DbgPrint("No current process\n");
-      //return(STATUS_UNSUCCESSFUL);
+      CPRINT("No current process\n");
+      if (Address < KERNEL_BASE)
+      {
+         return(STATUS_UNSUCCESSFUL);
+      }
    }
 
    /*
@@ -338,7 +341,7 @@
        */
       if (Mode != KernelMode)
       {
-         DbgPrint("%s:%d\n",__FILE__,__LINE__);
+	 CPRINT("Address: %x\n", Address);
          return(STATUS_UNSUCCESSFUL);
       }
       AddressSpace = MmGetKernelAddressSpace();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050528/e3456961/attachment.html


More information about the Ros-diffs mailing list