[NTOSKRNL] Reference the file object before issuing the unlock all IRP
authorPierre Schweitzer <pierre@reactos.org>
Sat, 29 Sep 2018 09:21:19 +0000 (11:21 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 29 Sep 2018 09:22:22 +0000 (11:22 +0200)
This fixes the last kmode assert triggered by httpd on ReactOS.

CORE-12045

ntoskrnl/io/iomgr/file.c

index 8e3b626..e7633a3 100644 (file)
@@ -1985,6 +1985,7 @@ IopCloseFile(IN PEPROCESS Process OPTIONAL,
             Irp->RequestorMode = KernelMode;
             Irp->Flags = IRP_SYNCHRONOUS_API;
             Irp->Overlay.AsynchronousParameters.UserApcRoutine = NULL;
+            ObReferenceObject(FileObject);
 
             /* Set up Stack Pointer Data */
             StackPtr = IoGetNextIrpStackLocation(Irp);