Fixed a bug in MmNotPresentFaultSectionView.
Removed some wrong calls to ObDereferenceObject in MmMapViewOfSection.
svn path=/trunk/; revision=2941
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: section.c,v 1.79 2002/03/03 19:47:58 ekohl Exp $
+/* $Id: section.c,v 1.80 2002/05/07 22:53:05 hbirr Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/section.c
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/section.c
if (!MmIsPagePresent(NULL, Address))
{
Entry = MmGetPageEntrySectionSegment(Segment, Offset.u.LowPart);
if (!MmIsPagePresent(NULL, Address))
{
Entry = MmGetPageEntrySectionSegment(Segment, Offset.u.LowPart);
+ if (Entry == 0)
+ {
+ MmUnlockSectionSegment(Segment);
+ MmUnlockSection(Section);
+ MmReleasePageOp(PageOp);
+ return(STATUS_MM_RESTART_OPERATION);
+ }
Page = (PVOID)(PAGE_FROM_SSE(Entry));
MmReferencePage(Page);
Page = (PVOID)(PAGE_FROM_SSE(Entry));
MmReferencePage(Page);
FileObject->SectionObjectPointers->ImageSectionObject =
(PVOID)ImageSectionObject;
FileObject->SectionObjectPointers->ImageSectionObject =
(PVOID)ImageSectionObject;
- ExFreePool(ImageSections);
+ ExFreePool(ImageSections);
KeSetEvent((PVOID)&FileObject->Lock, IO_NO_INCREMENT, FALSE);
Section->FileObject = FileObject;
KeSetEvent((PVOID)&FileObject->Lock, IO_NO_INCREMENT, FALSE);
Section->FileObject = FileObject;
{
MmUnlockSection(Section);
MmUnlockAddressSpace(AddressSpace);
{
MmUnlockSection(Section);
MmUnlockAddressSpace(AddressSpace);
- ObDereferenceObject(Section);
- ObDereferenceObject(Process);
{
MmUnlockSection(Section);
MmUnlockAddressSpace(AddressSpace);
{
MmUnlockSection(Section);
MmUnlockAddressSpace(AddressSpace);
- ObDereferenceObject(Section);
- ObDereferenceObject(Process);
return(STATUS_MAPPED_ALIGNMENT);
}
return(STATUS_MAPPED_ALIGNMENT);
}
{
MmUnlockSection(Section);
MmUnlockAddressSpace(AddressSpace);
{
MmUnlockSection(Section);
MmUnlockAddressSpace(AddressSpace);
- ObDereferenceObject(Section);
- ObDereferenceObject(Process);