[Kernel] NtReadFile: Add APC call only for successful executions
This commit is contained in:
committed by
Radosław Gliński
parent
97be6ebf51
commit
96c2fb13f7
@@ -160,7 +160,7 @@ dword_result_t NtReadFile_entry(dword_t file_handle, dword_t event_handle,
|
|||||||
// though were are completing immediately.
|
// though were are completing immediately.
|
||||||
// Low bit probably means do not queue to IO ports.
|
// Low bit probably means do not queue to IO ports.
|
||||||
if ((uint32_t)apc_routine_ptr & ~1) {
|
if ((uint32_t)apc_routine_ptr & ~1) {
|
||||||
if (apc_context) {
|
if (apc_context && result == X_STATUS_SUCCESS) {
|
||||||
auto thread = XThread::GetCurrentThread();
|
auto thread = XThread::GetCurrentThread();
|
||||||
thread->EnqueueApc(static_cast<uint32_t>(apc_routine_ptr) & ~1u,
|
thread->EnqueueApc(static_cast<uint32_t>(apc_routine_ptr) & ~1u,
|
||||||
apc_context, io_status_block, 0);
|
apc_context, io_status_block, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user