mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 19:31:45 +00:00
[NTOS]
IofCompleteRequest: Skip the stack location at the beginning of the loop instead of before and at the end to avoid double skipping of the last valid stack location in certain cases. This prevents the ASSERT in IoSkipCurrentIrpStackLocation to be hit. Note: this leads to a different value of Irp->CurrentLocation and Irp->Tail.Overlay.CurrentStackLocation after the last completion routine has been called. But that should hopefully not make a difference. svn path=/branches/header-work/; revision=45996
This commit is contained in:
parent
b9ef6c177a
commit
31638dffc7
1 changed files with 6 additions and 5 deletions
|
@ -1217,13 +1217,15 @@ IofCompleteRequest(IN PIRP Irp,
|
|||
ErrorCode = PtrToUlong(LastStackPtr->Parameters.Others.Argument4);
|
||||
}
|
||||
|
||||
/* Get the Current Stack and skip it */
|
||||
/* Get the Current Stack */
|
||||
StackPtr = IoGetCurrentIrpStackLocation(Irp);
|
||||
IoSkipCurrentIrpStackLocation(Irp);
|
||||
|
||||
/* Loop the Stacks and complete the IRPs */
|
||||
do
|
||||
{
|
||||
/* Skip current stack location */
|
||||
IoSkipCurrentIrpStackLocation(Irp);
|
||||
|
||||
/* Set Pending Returned */
|
||||
Irp->PendingReturned = StackPtr->Control & SL_PENDING_RETURNED;
|
||||
|
||||
|
@ -1286,10 +1288,9 @@ IofCompleteRequest(IN PIRP Irp,
|
|||
IopClearStackLocation(StackPtr);
|
||||
}
|
||||
|
||||
/* Move to next stack location and pointer */
|
||||
IoSkipCurrentIrpStackLocation(Irp);
|
||||
/* Move pointer to next stack location */
|
||||
StackPtr++;
|
||||
} while (Irp->CurrentLocation <= (Irp->StackCount + 1));
|
||||
} while (Irp->CurrentLocation <= Irp->StackCount);
|
||||
|
||||
/* Check if the IRP is an associated IRP */
|
||||
if (Irp->Flags & IRP_ASSOCIATED_IRP)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue