Hi all
I have created simple thread inside my kernel driver. I used InsertTailList function to add objects into my queue inside my thread.I have created implementation for IoDeviceControl function for link my driver with user application.When i try to get object from not empty queue using RemoveHeadList function my driver failed with BSOD with IRQL_NOT_LESS_OR_EQUAL error.
Section code with using InsertTailList please see below:
(follow code section from my Thread)
KeAcquireInStackQueuedSpinLock(
&gPacketInfoListLock,
&packetInfoListLockHandle
);
InsertTailList(&gPacketInfoList, &packetInfo->listEntry);
packetInfo=NULL;
KeReleaseInStackQueuedSpinLock(&packetInfoListLockHandle);
Section code with using RemoveHeadList please see below:
(follow code section from my implementation IoDeviceControl)
while (!IsListEmpty(&gPacketInfoList))
{
KeAcquireInStackQueuedSpinLock(
&gPacketInfoListLock,
&packetInfoListLockHandle);
listEntry = RemoveHeadList(&gPacketInfoList);
packet = CONTAINING_RECORD(
listEntry,
PACKET_INFO,
listEntry
);
KeReleaseInStackQueuedSpinLock(&packetInfoListLockHandle);
}
Thanks in advance for any help!