From 8d1beca11925d36b2eb0c977adb5cd0afa5f709a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20S=C5=82abo=C5=84?= Date: Thu, 11 Jan 2024 12:29:53 +0100 Subject: [PATCH] [NTOSKRNL_VISTA] IoQueueWorkItemEx: Pass new context for the queue (#6276) Passing parameter-provided context results in missing WorkerRoutine and WorkItem when callback is executed. --- sdk/lib/drivers/ntoskrnl_vista/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/lib/drivers/ntoskrnl_vista/io.c b/sdk/lib/drivers/ntoskrnl_vista/io.c index e3686abd12e..a0ec83bda9a 100644 --- a/sdk/lib/drivers/ntoskrnl_vista/io.c +++ b/sdk/lib/drivers/ntoskrnl_vista/io.c @@ -63,7 +63,7 @@ IoQueueWorkItemEx( newContext->WorkItemRoutineEx = WorkerRoutine; newContext->Context = Context; - IoQueueWorkItem(IoWorkItem, IopWorkItemExCallback, QueueType, Context); + IoQueueWorkItem(IoWorkItem, IopWorkItemExCallback, QueueType, newContext); } _IRQL_requires_max_(PASSIVE_LEVEL)