mirror of
https://github.com/reactos/reactos.git
synced 2024-08-13 22:56:37 +00:00
[NTOSKRNL]
- Fix a case where we miss copying back the IO_STATUS_BLOCK into the UserIosb buffer - Fixes the registry corruption caused when PnP wrote an invalid resource list (passed back via UserIosb->Information) to the registry - Hopefully this also fixes a few other nasty bugs in other areas related to this issue svn path=/trunk/; revision=46719
This commit is contained in:
parent
4525984fb0
commit
2f22a7d7f8
|
@ -469,9 +469,6 @@ IopCompleteRequest(IN PKAPC Apc,
|
||||||
/* So we did return with a synch operation, was it the IRP? */
|
/* So we did return with a synch operation, was it the IRP? */
|
||||||
if (Irp->Flags & IRP_SYNCHRONOUS_API)
|
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 */
|
/* Now check if the user gave an event */
|
||||||
if (Irp->UserEvent)
|
if (Irp->UserEvent)
|
||||||
{
|
{
|
||||||
|
@ -495,6 +492,22 @@ IopCompleteRequest(IN PKAPC Apc,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 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;
|
||||||
|
}
|
||||||
|
|
||||||
/* Now that we got here, we do this for incomplete I/Os as well */
|
/* Now that we got here, we do this for incomplete I/Os as well */
|
||||||
if ((FileObject) && !(Irp->Flags & IRP_CREATE_OPERATION))
|
if ((FileObject) && !(Irp->Flags & IRP_CREATE_OPERATION))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue