mirror of
https://github.com/donnaskiez/ac.git
synced 2024-11-21 22:24:08 +01:00
e
This commit is contained in:
parent
6203ebde15
commit
6246307bfd
2 changed files with 10 additions and 7 deletions
|
@ -50,14 +50,9 @@ NTSTATUS DeviceControl(
|
|||
if ( !NT_SUCCESS( status ) )
|
||||
DEBUG_ERROR( "Failed to start thread to validate system drivers" );
|
||||
|
||||
/*
|
||||
* wait on our thread so we dont complete the IRP before we've filled the
|
||||
* buffer with information and prevent any weird IRP multithreaded interactions
|
||||
*/
|
||||
KeWaitForSingleObject( handle, Executive, KernelMode, FALSE, NULL );
|
||||
|
||||
/* return early as IRP completion was handled inside the function */
|
||||
ZwClose( handle );
|
||||
break;
|
||||
return status;
|
||||
|
||||
default:
|
||||
DEBUG_ERROR( "Invalid IOCTL passed to driver" );
|
||||
|
|
|
@ -333,5 +333,13 @@ NTSTATUS HandleValidateDriversIOCTL(
|
|||
|
||||
ExFreePoolWithTag( head, INVALID_DRIVER_LIST_HEAD_POOL );
|
||||
ExFreePoolWithTag( system_modules.address, SYSTEM_MODULES_POOL );
|
||||
|
||||
/*
|
||||
* Complete the IRP here so we don't have to implement a waiting mechanism
|
||||
* to prevent an early completion of the IRP.
|
||||
*/
|
||||
IoCompleteRequest( Irp, IO_NO_INCREMENT );
|
||||
Irp->IoStatus.Status = status;
|
||||
|
||||
return status;
|
||||
}
|
Loading…
Reference in a new issue