mirror of
https://github.com/reactos/reactos.git
synced 2024-11-02 12:53:33 +00:00
[NTOSKRNL]
- Fix stack skipping logic in IofCompleteRequest - Fixes displaying MULTIPLE_IRP_COMPLETE_REQUESTS bug check - Patch by lassy with a typo fix by me svn path=/trunk/; revision=47417
This commit is contained in:
parent
7f10ebad54
commit
04c946cecc
|
@ -1217,15 +1217,22 @@ IofCompleteRequest(IN PIRP Irp,
|
||||||
ErrorCode = PtrToUlong(LastStackPtr->Parameters.Others.Argument4);
|
ErrorCode = PtrToUlong(LastStackPtr->Parameters.Others.Argument4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the Current Stack */
|
/*
|
||||||
StackPtr = IoGetCurrentIrpStackLocation(Irp);
|
* Start the loop with the current stack and point the IRP to the next stack
|
||||||
|
* and then keep incrementing the stack as we loop through. The IRP should
|
||||||
/* Loop the Stacks and complete the IRPs */
|
* always point to the next stack location w.r.t the one currently being
|
||||||
do
|
* analyzed, so completion routine code will see the appropriate value.
|
||||||
|
* Because of this, we must loop until the current stack location is +1 of
|
||||||
|
* the stack count, because when StackPtr is at the end, CurrentLocation is +1.
|
||||||
|
*/
|
||||||
|
for (StackPtr = IoGetCurrentIrpStackLocation(Irp),
|
||||||
|
Irp->CurrentLocation++,
|
||||||
|
Irp->Tail.Overlay.CurrentStackLocation++;
|
||||||
|
Irp->CurrentLocation <= (Irp->StackCount + 1);
|
||||||
|
StackPtr++,
|
||||||
|
Irp->CurrentLocation++,
|
||||||
|
Irp->Tail.Overlay.CurrentStackLocation++)
|
||||||
{
|
{
|
||||||
/* Skip current stack location */
|
|
||||||
IoSkipCurrentIrpStackLocation(Irp);
|
|
||||||
|
|
||||||
/* Set Pending Returned */
|
/* Set Pending Returned */
|
||||||
Irp->PendingReturned = StackPtr->Control & SL_PENDING_RETURNED;
|
Irp->PendingReturned = StackPtr->Control & SL_PENDING_RETURNED;
|
||||||
|
|
||||||
|
@ -1287,10 +1294,7 @@ IofCompleteRequest(IN PIRP Irp,
|
||||||
/* Clear the stack location */
|
/* Clear the stack location */
|
||||||
IopClearStackLocation(StackPtr);
|
IopClearStackLocation(StackPtr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* Move pointer to next stack location */
|
|
||||||
StackPtr++;
|
|
||||||
} while (Irp->CurrentLocation <= Irp->StackCount);
|
|
||||||
|
|
||||||
/* Check if the IRP is an associated IRP */
|
/* Check if the IRP is an associated IRP */
|
||||||
if (Irp->Flags & IRP_ASSOCIATED_IRP)
|
if (Irp->Flags & IRP_ASSOCIATED_IRP)
|
||||||
|
|
Loading…
Reference in a new issue