Author: tkreuzer
Date: Wed Mar 28 21:09:03 2012
New Revision: 56265
URL:
http://svn.reactos.org/svn/reactos?rev=56265&view=rev
Log:
[NTOSKRNL]
- ObReferenceObject() does NOT return an NTSTATUS. It returns the new reference count.
Remove pointless NT_SUCCESS check
- Enable interrupts in amd54 page fault handler before calling MmAccessFault
- Add missing MmDecommittedPte for amd64
Modified:
trunk/reactos/ntoskrnl/cache/section/swapout.c
trunk/reactos/ntoskrnl/ke/amd64/trap.S
trunk/reactos/ntoskrnl/mm/amd64/init.c
Modified: trunk/reactos/ntoskrnl/cache/section/swapout.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/swa…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/swapout.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/swapout.c [iso-8859-1] Wed Mar 28 21:09:03 2012
@@ -349,13 +349,7 @@
ExReleaseFastMutex(&RmapListLock);
goto bail;
}
- Status = ObReferenceObject(Process);
- if (!NT_SUCCESS(Status))
- {
- DPRINT("bail\n");
- ExReleaseFastMutex(&RmapListLock);
- goto bail;
- }
+ ObReferenceObject(Process);
ProcRef = TRUE;
AddressSpace = &Process->Vm;
}
Modified: trunk/reactos/ntoskrnl/ke/amd64/trap.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/trap.S?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] Wed Mar 28 21:09:03 2012
@@ -416,6 +416,9 @@
mov rdx, cr2
mov [rbp + KTRAP_FRAME_FaultAddress], rdx
+ /* Enable interrupts for the page fault handler */
+ sti
+
/* Call page fault handler */
mov ecx, [rbp + KTRAP_FRAME_ErrorCode] // StoreInstruction
and ecx, 1
@@ -428,6 +431,9 @@
/* Check for success */
test eax, eax
jge PageFaultReturn
+
+ /* Disable interrupts again for the debugger */
+ cli
/* Set parameter 1 to error code */
mov r9d, [rbp + KTRAP_FRAME_ErrorCode]
Modified: trunk/reactos/ntoskrnl/mm/amd64/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/amd64/init.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/amd64/init.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/amd64/init.c [iso-8859-1] Wed Mar 28 21:09:03 2012
@@ -33,6 +33,9 @@
/* Template PTE for prototype page */
MMPTE PrototypePte = {{(MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS) |
PTE_PROTOTYPE | (MI_PTE_LOOKUP_NEEDED << 32)}};
+
+/* Template PTE for decommited page */
+MMPTE MmDecommittedPte = {{MM_DECOMMIT << MM_PTE_SOFTWARE_PROTECTION_BITS}};
/* Address ranges */
PVOID MiSessionViewEnd;