From 207ff9444e946e3736f34ef6eaf32ab065cf8ca9 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 29 Sep 2018 11:21:19 +0200 Subject: [PATCH] [NTOSKRNL] Reference the file object before issuing the unlock all IRP This fixes the last kmode assert triggered by httpd on ReactOS. CORE-12045 --- ntoskrnl/io/iomgr/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ntoskrnl/io/iomgr/file.c b/ntoskrnl/io/iomgr/file.c index 8e3b626cdf0..e7633a331f9 100644 --- a/ntoskrnl/io/iomgr/file.c +++ b/ntoskrnl/io/iomgr/file.c @@ -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);