From: Cameron Gutman Date: Sun, 4 Apr 2010 21:43:51 +0000 (+0000) Subject: [NTOSKRNL] X-Git-Tag: backups/header-work@57446~30^2~112 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=dfb82f3856967a4394e5e8ab1814c750f15734f0;hp=6141336a7894c8c80f30e5dc37029dedf80c21ac;ds=sidebyside [NTOSKRNL] - Revert r46720 and fix the issue properly svn path=/trunk/; revision=46724 --- diff --git a/reactos/ntoskrnl/io/iomgr/irp.c b/reactos/ntoskrnl/io/iomgr/irp.c index 21870d5f9cc..0863f58907b 100644 --- a/reactos/ntoskrnl/io/iomgr/irp.c +++ b/reactos/ntoskrnl/io/iomgr/irp.c @@ -460,22 +460,6 @@ IopCompleteRequest(IN PKAPC Apc, } else { - /* Check if we have an associated user IOSB */ - if (Irp->UserIosb) - { - /* We do, so let's give them the final status */ - _SEH2_TRY - { - /* Save the IOSB Information */ - *Irp->UserIosb = Irp->IoStatus; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - /* Ignore any error */ - } - _SEH2_END; - } - /* * Either we didn't return from the request, or we did return but this * request was synchronous. @@ -485,6 +469,9 @@ IopCompleteRequest(IN PKAPC Apc, /* So we did return with a synch operation, was it the IRP? */ if (Irp->Flags & IRP_SYNCHRONOUS_API) { + /* Yes, this IRP was synchronous, so return the I/O Status */ + *Irp->UserIosb = Irp->IoStatus; + /* Now check if the user gave an event */ if (Irp->UserEvent) { diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index 5d6c13336bc..0213d04d13e 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -163,7 +163,10 @@ IopStartDevice( DPRINT("IopInitiatePnpIrp(IRP_MN_FILTER_RESOURCE_REQUIREMENTS) failed\n"); return Status; } - DeviceNode->ResourceRequirements = (PIO_RESOURCE_REQUIREMENTS_LIST)IoStatusBlock.Information; + else if (NT_SUCCESS(Status)) + { + DeviceNode->ResourceRequirements = (PIO_RESOURCE_REQUIREMENTS_LIST)IoStatusBlock.Information; + } Status = IopAssignDeviceResources(DeviceNode, &RequiredLength); if (NT_SUCCESS(Status))