Hi ,
in a dpc routine (read callback from a serial device), i need to do some job
at lower irq , so i make a work item .
everything runs fine when loading my driver .
then on windows startup , after rebooting the computer , if i let computer
load till the end , then use my serial device , i got no problem .
but if use my device while windows is still loading the system hangs ( the
driver is still working as i still got output in my windbg session ) and the
work item callback isnt called by the system , and after 5 minutes ( always
5 mins ) the system resumes after the work item callback is finally called .
anyone would have any idea why i got such a behavior ?
work item init :
…
PSOME_EXTENSION bpx = (PSOME_EXTENSION) ExAllocatePool(PagedPool,
sizeof(SOME_EXTENSION));
if (!bpx)
{
KdPrint((DRIVERNAME " - ExAllocatePool failed to allocate %d bytes for
SOME_EXTENSION structure\n", sizeof(SOME_EXTENSION)));
return STATUS_INSUFFICIENT_RESOURCES;
}
bpx->DeviceExtension = pdx;
bpx->somevalue = somevalue
PIO_WORKITEM item = IoAllocateWorkItem(pdx->DeviceObject);
if (!item)
{
ExFreePool(bpx);
KdPrint((DRIVERNAME " - IoAllocateWorkItem failed\n"));
return STATUS_INSUFFICIENT_RESOURCES;
}
bpx->item = item;
IoQueueWorkItem(item, (PIO_WORKITEM_ROUTINE) WorkItemCallback,
DelayedWorkQueue, bpx);
KdPrint((DRIVERNAME " - Work item queued\n"));
…