https://git.reactos.org/?p=reactos.git;a=commitdiff;h=637183a12c6627f09d732…
commit 637183a12c6627f09d732377142696628ef5bdec
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Thu Jun 27 18:07:58 2019 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sat Oct 31 14:23:16 2020 +0100
[NTOS:KE:X64] Handle pending user APC on syscall exit (should be done on trap exit,
too)
---
ntoskrnl/ke/amd64/trap.S | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ntoskrnl/ke/amd64/trap.S b/ntoskrnl/ke/amd64/trap.S
index 9c3c085d2e7..731e21b250a 100644
--- a/ntoskrnl/ke/amd64/trap.S
+++ b/ntoskrnl/ke/amd64/trap.S
@@ -806,6 +806,13 @@ PUBLIC KiSystemServiceExit
IntsEnabled:
#endif
+ /* Check for pending user APC */
+ mov rcx, gs:qword ptr [PcCurrentThread]
+ cmp byte ptr [rcx + ThApcState + AsUserApcPending], 0
+ jz no_user_apc_pending
+ call KiInitiateUserApc
+no_user_apc_pending:
+
/* Disable interrupts for return */
cli