Help me , help please ;
i load my driver with utility “Driver verifier” ,
my driver which manage a virtual disk system (NTFS,FAT etc.) and virtual disk filesystem.
In IRP_MJ_WRITE i have blue screen in function virtual disk system,
the BSOD is produced before processing IRP function of my virtual disk system.
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************
DRIVER_VERIFIER_IOMANAGER_VIOLATION (c9)
The IO manager has caught a misbehaving driver.
Arguments:
Arg1: 0000000c, Invalid IOSB in IRP at APC IopCompleteRequest (appears to be on
stack that was unwound)
Arg2: f0c79fec, IOSB address
Arg3: 00000000, IRP address
Arg4: 00000000
NTSTATUS
DrvDispatch (
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
{
PIO_STACK_LOCATION irps;
NTSTATUS status=STATUS_NOT_IMPLEMENTED;
KdPrintf((“[VFUM] control\n”));
irps = IoGetCurrentIrpStackLocation(Irp);
if (irps!=NULL)
{
if (irps->MajorFunction==IRP_MJ_PNP)
{
KdPrintf((“IRP_MJ_PNP\n”));
Irp->IoStatus.Status=STATUS_SUCCESS;
status=STATUS_SUCCESS;
}
if (DeviceObject==g_devcontrol) // my function IOCTL
{
…
…
}
if (IsRawDisk(DeviceObject)==TRUE) //function called about my virtual disk , it"s function who is interested
{
KdPrintfd ((“In RawDisk\n”));
status=controldiskrawsystem(DeviceObject,Irp,irps);
if (status==STATUS_PENDING)
return status; //BUG ??? No because IoMarkIrpPending Called
//if other than STATUS_PENDING , it’s IoCompleteRequest
}
#endif
else
{
…
…
}
}
KdPrintf((“Return information : %x\n”,Irp->IoStatus.Information));
IoCompleteRequest(Irp, IO_NO_INCREMENT);
gty:
return status;
}
void IjThreadDiskRaw(PPARAM_RAWDISK pvr,IN PIRP irp)
{
PENTRYLR entryl;
HANDLE hp;
KIRQL oldirql;
hp=PsGetCurrentProcessId();
KdPrintfdr1((“Begin IjThreadDiskRaw (%x)\n”,hp));
irp->IoStatus.Status=STATUS_PENDING;
IoMarkIrpPending(irp);
entryl=(PENTRYLR)ExAllocatePoolWithTag(NonPagedPool,sizeof (TENTRYLR),45);
if (entryl!=NULL)
{
entryl->irp=irp;
entryl->processID=hp;
ExInterlockedInsertTailList(&pvr->list_head,
&entryl->le,
&pvr->list_lock);
/* ExInterlockedInsertTailList(&pvd->list_head,
&irp->Tail.Overlay.ListEntry,
&pvd->list_lock);*/
}
else
KdPrintfdr1((“Error allocation entryl\n”,NULL));
KeSetEvent(&pvr->request_event, (KPRIORITY) 0, FALSE);
}
NTSTATUS controldiskrawsystem(PDEVICE_OBJECT DeviceObject,PIRP irp,PIO_STACK_LOCATION irps)
{
NTSTATUS status=STATUS_INTERNAL_ERROR;
PPARAM_RAWDISK vdr=vdr_GetParam(DeviceObject);
irp->IoStatus.Information=0;
if (vdr!=NULL)
{
if (vdr->terminate_thread==FALSE)
{
if ((vdr->used==TRUE) && (vdr->parameter==TRUE))
{
//if (irps->MajorFunction==IRP_DEVICEIOCONTROL;
BOOLEAN ok=TRUE;
if (irps->MajorFunction==IRP_MJ_READ)
{
if (irps->Parameters.Read.Length==0)
{
KdPrintfdr1((“[Internal]IRP_MJ_READ=NULL\n”));
ok=FALSE;
}
}
if (irps->MajorFunction==IRP_MJ_WRITE)
{
if (irps->Parameters.Write.Length==0)
{
KdPrintfdr1((“[Internal]IRP_MJ_READ=NULL\n”));
ok=FALSE;
}
}
if (ok==TRUE)
{
IjThreadDiskRaw(vdr,irp);
return STATUS_PENDING;
}
else
{
KdPrintfdr1((“[Internal]IRP_MJ_READ=NULL\n”));
KdPrintfdr1((“[Internal]OK=FALSE\n”));
irp->IoStatus.Status=STATUS_SUCCESS;
return STATUS_SUCCESS;
}
}
else
{
KdPrintfdr1((“[Internal]STATUS_DEVICE_NOT_READY\n”));
irp->IoStatus.Status=status=STATUS_DEVICE_NOT_READY;
}
}
else
{
KdPrintfdr1((“[Internal]STATUS_DEVICE_REMOVED\n”));
irp->IoStatus.Status=status=STATUS_DEVICE_REMOVED;
}
}
return status;
}
Thank you for me help;