Author: pschweitzer Date: Sat Oct 10 14:52:19 2015 New Revision: 69489
URL: http://svn.reactos.org/svn/reactos?rev=69489&view=rev Log: [CSQ] Add even more sanity checks
Modified: trunk/reactos/lib/drivers/csq/csq.c
Modified: trunk/reactos/lib/drivers/csq/csq.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/csq/csq.c?rev=6... ============================================================================== --- trunk/reactos/lib/drivers/csq/csq.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/csq/csq.c [iso-8859-1] Sat Oct 10 14:52:19 2015 @@ -337,6 +337,8 @@ if(!Irp) break;
+ ASSERT(Context->Csq == Csq); + /* Unset the cancel routine and see if it has already been canceled */ if(!IoSetCancelRoutine(Irp, NULL)) { @@ -348,6 +350,8 @@ break; }
+ ASSERT(Context == Irp->Tail.Overlay.DriverContext[3]); + /* This IRP is valid and is ours. Dequeue it, fix it up, and return */ Csq->CsqRemoveIrp(Csq, Irp);
@@ -358,7 +362,7 @@ Context->Irp = NULL;
ASSERT(Context->Csq == Csq); - } + } } while(0);
@@ -412,8 +416,12 @@ /* Unset the context stuff and return */ Context = (PIO_CSQ_IRP_CONTEXT)InterlockedExchangePointer(&Irp->Tail.Overlay.DriverContext[3], NULL);
- if(Context && Context->Type == IO_TYPE_CSQ_IRP_CONTEXT) + if (Context && Context->Type == IO_TYPE_CSQ_IRP_CONTEXT) + { Context->Irp = NULL; + + ASSERT(Context->Csq == Csq); + }
break; }