mirror of
https://github.com/reactos/reactos.git
synced 2025-04-05 13:11:22 +00:00
- Restart the access fault handler if the return value is STATUS_MM_RESTART_OPERATION.
svn path=/trunk/; revision=4913
This commit is contained in:
parent
11eb72da00
commit
1d64761f02
1 changed files with 38 additions and 33 deletions
|
@ -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.61 2003/05/17 19:16:02 ekohl Exp $
|
||||
/* $Id: mm.c,v 1.62 2003/06/16 19:20:28 hbirr Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -119,6 +119,7 @@ NTSTATUS MmReleaseMmInfo(PEPROCESS Process)
|
|||
BOOLEAN STDCALL MmIsNonPagedSystemAddressValid(PVOID VirtualAddress)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN STDCALL MmIsAddressValid(PVOID VirtualAddress)
|
||||
|
@ -197,46 +198,50 @@ NTSTATUS MmAccessFault(KPROCESSOR_MODE Mode,
|
|||
{
|
||||
MmLockAddressSpace(AddressSpace);
|
||||
}
|
||||
MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace, (PVOID)Address);
|
||||
if (MemoryArea == NULL)
|
||||
do
|
||||
{
|
||||
DbgPrint("%s:%d\n",__FILE__,__LINE__);
|
||||
if (!FromMdl)
|
||||
{
|
||||
MmUnlockAddressSpace(AddressSpace);
|
||||
MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace, (PVOID)Address);
|
||||
if (MemoryArea == NULL)
|
||||
{
|
||||
if (!FromMdl)
|
||||
{
|
||||
MmUnlockAddressSpace(AddressSpace);
|
||||
}
|
||||
return (STATUS_UNSUCCESSFUL);
|
||||
}
|
||||
|
||||
switch (MemoryArea->Type)
|
||||
{
|
||||
case MEMORY_AREA_SYSTEM:
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
break;
|
||||
|
||||
case MEMORY_AREA_PAGED_POOL:
|
||||
Status = STATUS_SUCCESS;
|
||||
break;
|
||||
|
||||
case MEMORY_AREA_SECTION_VIEW:
|
||||
Status = MmAccessFaultSectionView(AddressSpace,
|
||||
MemoryArea,
|
||||
(PVOID)Address,
|
||||
Locked);
|
||||
break;
|
||||
|
||||
case MEMORY_AREA_VIRTUAL_MEMORY:
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
break;
|
||||
|
||||
case MEMORY_AREA_SHARED_DATA:
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
break;
|
||||
}
|
||||
return(STATUS_UNSUCCESSFUL);
|
||||
}
|
||||
while (Status == STATUS_MM_RESTART_OPERATION);
|
||||
|
||||
switch (MemoryArea->Type)
|
||||
{
|
||||
case MEMORY_AREA_SYSTEM:
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
break;
|
||||
|
||||
case MEMORY_AREA_PAGED_POOL:
|
||||
Status = STATUS_SUCCESS;
|
||||
break;
|
||||
|
||||
case MEMORY_AREA_SECTION_VIEW:
|
||||
Status = MmAccessFaultSectionView(AddressSpace,
|
||||
MemoryArea,
|
||||
(PVOID)Address,
|
||||
Locked);
|
||||
break;
|
||||
|
||||
case MEMORY_AREA_VIRTUAL_MEMORY:
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
break;
|
||||
|
||||
case MEMORY_AREA_SHARED_DATA:
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
break;
|
||||
|
||||
default:
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
break;
|
||||
}
|
||||
DPRINT("Completed page fault handling\n");
|
||||
if (!FromMdl)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue