From be3e5ea0f06688c4a70f3e27003528c9d7d5ac35 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Wed, 26 Apr 2023 15:23:11 +0300 Subject: [PATCH] Revert "Driver: Expand kernel stack for driver entry" This reverts commit 5846e535dac7ef201fc962d50775634eac9fdcab. --- src/driver/fortdrv.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/driver/fortdrv.c b/src/driver/fortdrv.c index 23bca49c..05e0e5d6 100644 --- a/src/driver/fortdrv.c +++ b/src/driver/fortdrv.c @@ -93,23 +93,6 @@ static void fort_driver_unload(PDRIVER_OBJECT driver) fort_device_set(NULL); } -static void NTAPI fort_driver_load_device_expand(PVOID param) -{ - NTSTATUS *status = param; - - *status = fort_device_load(); -} - -inline static void fort_driver_load_device(NTSTATUS *status) -{ - const NTSTATUS status_expand = KeExpandKernelStackAndCallout( - &fort_driver_load_device_expand, status, FORT_KERNEL_STACK_SIZE); - - if (!NT_SUCCESS(status_expand)) { - *status = status_expand; - } -} - static NTSTATUS fort_driver_load(PDRIVER_OBJECT driver, PUNICODE_STRING reg_path) { NTSTATUS status; @@ -134,9 +117,7 @@ static NTSTATUS fort_driver_load(PDRIVER_OBJECT driver, PUNICODE_STRING reg_path driver->MajorFunction[IRP_MJ_DEVICE_CONTROL] = &fort_device_control; driver->MajorFunction[IRP_MJ_SHUTDOWN] = &fort_device_shutdown; - fort_driver_load_device(&status); - - return status; + return fort_device_load(); } NTSTATUS DriverCallbacksSetup(PFORT_PROXYCB_INFO cb_info)