mirror of
https://github.com/reactos/reactos.git
synced 2025-04-30 11:08:51 +00:00
[NTOS:MM] Disable APC while performing Paged Read
This commit is contained in:
parent
02167f2fb3
commit
e46f1a9af3
1 changed files with 6 additions and 0 deletions
|
@ -1187,6 +1187,7 @@ MiReadPage(PMEMORY_AREA MemoryArea,
|
||||||
PMDL Mdl = (PMDL)MdlBase;
|
PMDL Mdl = (PMDL)MdlBase;
|
||||||
PFILE_OBJECT FileObject = MemoryArea->SectionData.Segment->FileObject;
|
PFILE_OBJECT FileObject = MemoryArea->SectionData.Segment->FileObject;
|
||||||
LARGE_INTEGER FileOffset;
|
LARGE_INTEGER FileOffset;
|
||||||
|
KIRQL OldIrql;
|
||||||
|
|
||||||
FileOffset.QuadPart = MemoryArea->SectionData.Segment->Image.FileOffset + SegOffset;
|
FileOffset.QuadPart = MemoryArea->SectionData.Segment->Image.FileOffset + SegOffset;
|
||||||
|
|
||||||
|
@ -1203,6 +1204,9 @@ MiReadPage(PMEMORY_AREA MemoryArea,
|
||||||
|
|
||||||
KeInitializeEvent(&Event, NotificationEvent, FALSE);
|
KeInitializeEvent(&Event, NotificationEvent, FALSE);
|
||||||
|
|
||||||
|
/* Disable APCs */
|
||||||
|
KeRaiseIrql(APC_LEVEL, &OldIrql);
|
||||||
|
|
||||||
Status = IoPageRead(FileObject, Mdl, &FileOffset, &Event, &IoStatus);
|
Status = IoPageRead(FileObject, Mdl, &FileOffset, &Event, &IoStatus);
|
||||||
if (Status == STATUS_PENDING)
|
if (Status == STATUS_PENDING)
|
||||||
{
|
{
|
||||||
|
@ -1215,6 +1219,8 @@ MiReadPage(PMEMORY_AREA MemoryArea,
|
||||||
MmUnmapLockedPages (Mdl->MappedSystemVa, Mdl);
|
MmUnmapLockedPages (Mdl->MappedSystemVa, Mdl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KeLowerIrql(OldIrql);
|
||||||
|
|
||||||
if (Status == STATUS_END_OF_FILE)
|
if (Status == STATUS_END_OF_FILE)
|
||||||
{
|
{
|
||||||
DPRINT1("Got STATUS_END_OF_FILE at offset %I64d for file %wZ.\n", SegOffset, &FileObject->FileName);
|
DPRINT1("Got STATUS_END_OF_FILE at offset %I64d for file %wZ.\n", SegOffset, &FileObject->FileName);
|
||||||
|
|
Loading…
Reference in a new issue