From 7c3d94291ec220bab5ab73a9dbf6fad32d13ba22 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Fri, 2 Nov 2007 16:00:58 +0000 Subject: [PATCH] - It may happen so, that the driver was loaded by the bootloader, but failed initialization (thus DriverObject == NULL), and later PNP manager tries to install it again, and BSOD due to NULL DriverObject (because really only its image is loaded, but it's not initialized). Prevent this situation by initializing DriverObject in that case. svn path=/trunk/; revision=30071 --- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index 87ac29df1ea..0770453f11d 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -2516,7 +2516,8 @@ IopActionInitChildServices(PDEVICE_NODE DeviceNode, { /* STATUS_IMAGE_ALREADY_LOADED means this driver was loaded by the bootloader */ - if (Status != STATUS_IMAGE_ALREADY_LOADED) + if ((Status != STATUS_IMAGE_ALREADY_LOADED) || + (Status == STATUS_IMAGE_ALREADY_LOADED && !DriverObject)) { /* Initialize the driver */ Status = IopInitializeDriverModule(DeviceNode, ModuleObject,