Author: tkreuzer
Date: Tue Mar 18 20:41:26 2014
New Revision: 62532
URL:
http://svn.reactos.org/svn/reactos?rev=62532&view=rev
Log:
[NTOSKRNL]
Fix KiCallbackReturnHandler
Modified:
branches/kernel-fun/reactos/ntoskrnl/ke/i386/traphdlr.c
Modified: branches/kernel-fun/reactos/ntoskrnl/ke/i386/traphdlr.c
URL:
http://svn.reactos.org/svn/reactos/branches/kernel-fun/reactos/ntoskrnl/ke/…
==============================================================================
--- branches/kernel-fun/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] (original)
+++ branches/kernel-fun/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] Tue Mar 18
20:41:26 2014
@@ -1455,7 +1455,17 @@
FASTCALL
KiCallbackReturnHandler(IN PKTRAP_FRAME TrapFrame)
{
+ PKTHREAD Thread;
NTSTATUS Status;
+
+ /* Save the SEH chain, NtCallbackReturn will restore this */
+ TrapFrame->ExceptionList = KeGetPcr()->NtTib.ExceptionList;
+
+ /* Set thread fields */
+ Thread = KeGetCurrentThread();
+ Thread->TrapFrame = TrapFrame;
+ Thread->PreviousMode = KiUserTrap(TrapFrame);
+ NT_ASSERT(Thread->PreviousMode != KernelMode);
/* Pass the register parameters to NtCallbackReturn.
Result pointer is in ecx, result length in edx, status in eax */