Windows driver: revert IRP completion overhaul changes until more tests are conducted

This commit is contained in:
Mounir IDRASSI
2025-09-13 15:08:38 +09:00
parent f6f25eec8f
commit 02e7b48836
2 changed files with 125 additions and 315 deletions

View File

@@ -46,7 +46,6 @@ typedef struct _COMPLETE_IRP_WORK_ITEM
ULONG_PTR Information;
void* Item;
LIST_ENTRY ListEntry; // For managing free work items
BOOLEAN FromPool; // TRUE if taken from prealloc pool
} COMPLETE_IRP_WORK_ITEM, * PCOMPLETE_IRP_WORK_ITEM;
typedef struct
@@ -141,13 +140,11 @@ typedef struct
PCOMPLETE_IRP_WORK_ITEM WorkItemPool;
ULONG MaxWorkItems;
LIST_ENTRY FreeWorkItemsList;
KSEMAPHORE WorkItemSemaphore;
KSPIN_LOCK WorkItemLock;
volatile LONG ActiveWorkItems;
KEVENT NoActiveWorkItemsEvent;
// signaled whenever a pooled work item returns to the free list
KEVENT WorkItemAvailableEvent;
} EncryptedIoQueue;
@@ -159,7 +156,6 @@ typedef struct
ULONG OriginalLength;
LARGE_INTEGER OriginalOffset;
NTSTATUS Status;
ULONG_PTR BytesCompleted; // actual bytes transferred across all fragments
#ifdef TC_TRACE_IO_QUEUE
LARGE_INTEGER OriginalIrpOffset;
@@ -179,8 +175,6 @@ typedef struct
ULONG EncryptedLength;
uint8 *Data;
uint8 *OrigDataBufferFragment;
ULONG ActualBytes; // actual bytes transferred for this fragment (0 on failure)
UCHAR WiRetryCount; // count how many times we failed to get a work item
LIST_ENTRY ListEntry;
LIST_ENTRY CompletionListEntry;