Hi,
I get this driver verifier violation in my code:
************************************************************
Driver Verifier detected violation:
The driver issued an I/O request with an event that was already signalled
and received a STATUS_PENDING response. This can result in unwinding
before the I/O is complete.
CulpritAddress = A46234A9, Irp = 89B74EC8.
************************************************************
I’m not able to see how this could be caused…any pointers would be great.
Here is the code snippet:
=====
KEVENT Evt;
IO_STATUS_BLOCK iostatus;
PIRP pIrp = NULL;
KeInitializeEvent(&Evt,SynchronizationEvent, FALSE);
pIrp = IoBuildDeviceIoControlRequest((ULONG)IOCTL,gpdev,(LPVOID)ptr, len, NULL,0,FALSE, &Evt, &iostatus);
if(pIrp)
{
PIO_STACK_LOCATION pIoStack = IoGetNextIrpStackLocation(pIrp);
pIoStack->FileObject = gpfile;
IoCallDriver(gpdev, pIrp);
if(iostatus.Status == STATUS_SUCCESS)
ret = TRUE;
else if(iostatus.Status == STATUS_PENDING)
{
Status = KeWaitForSingleObject((PVOID)&Evt, Executive, KernelMode, FALSE, NULL);
if(Status == STATUS_SUCCESS)
ret = TRUE;
}
}
I see this only when this code is executed by multiple threads. I do not see how the event could remain signalled…I have specified infinite wait in KeWaitForSingleObject.
Thank you very much!
Regards
Madhavi