From: Aleksey Bragin Date: Wed, 22 Nov 2006 10:15:51 +0000 (+0000) Subject: The code expects synchronous behaviour here, so until a better solution exists, IoSyn... X-Git-Tag: backups/alex-kd-branch@25995~25^2~875 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=48953bfa7166ec38d3719c657d748d247528c23d The code expects synchronous behaviour here, so until a better solution exists, IoSynchronousInvalidateDeviceRelations() is going to be used. This fixes the "Loading ndis.sys" problems. Thanks to Dmitry Gorbachev, confirmed by Herve Poussineau. See issue #1875 for more details. svn path=/trunk/; revision=24798 --- diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index d421b4a6bad..77a470d20b3 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -43,6 +43,13 @@ IopInvalidateDeviceRelations( IN PDEVICE_OBJECT DeviceObject, IN PVOID InvalidateContext); +VOID +NTAPI +IoSynchronousInvalidateDeviceRelations( + IN PDEVICE_OBJECT DeviceObject, + IN DEVICE_RELATION_TYPE Type); + + /* FUNCTIONS *****************************************************************/ PDEVICE_NODE @@ -144,7 +151,9 @@ IopStartDevice( if (IopDeviceNodeHasFlag(DeviceNode, DNF_NEED_ENUMERATION_ONLY)) { DPRINT("Device needs enumeration, invalidating bus relations\n"); - IoInvalidateDeviceRelations(DeviceNode->PhysicalDeviceObject, BusRelations); + /* Invalidate device relations synchronously + (otherwise there will be dirty read of DeviceNode) */ + IoSynchronousInvalidateDeviceRelations(DeviceNode->PhysicalDeviceObject, BusRelations); IopDeviceNodeClearFlag(DeviceNode, DNF_NEED_ENUMERATION_ONLY); } }