Author: fireball
Date: Sun Sep 9 17:00:14 2007
New Revision: 28978
URL:
http://svn.reactos.org/svn/reactos?rev=28978&view=rev
Log:
- Revert 28967, and fix the real issue where an overwrite occured (in KiMoveApcState()).
Modified:
trunk/reactos/include/ddk/ntifs.h
trunk/reactos/include/ndk/ifssupp.h
trunk/reactos/ntoskrnl/ke/apc.c
Modified: trunk/reactos/include/ddk/ntifs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=28…
==============================================================================
--- trunk/reactos/include/ddk/ntifs.h (original)
+++ trunk/reactos/include/ddk/ntifs.h Sun Sep 9 17:00:14 2007
@@ -635,7 +635,6 @@
LARGE_INTEGER CreationTime;
} OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
-#include <pshpack1.h>
typedef struct _KAPC_STATE {
LIST_ENTRY ApcListHead[2];
PKPROCESS Process;
@@ -643,7 +642,7 @@
BOOLEAN KernelApcPending;
BOOLEAN UserApcPending;
} KAPC_STATE, *PKAPC_STATE, *RESTRICTED_POINTER PRKAPC_STATE;
-#include <poppack.h>
+#define KAPC_STATE_ACTUAL_LENGTH (FIELD_OFFSET(KAPC_STATE, UserApcPending) +
sizeof(BOOLEAN))
typedef struct _BITMAP_RANGE {
LIST_ENTRY Links;
Modified: trunk/reactos/include/ndk/ifssupp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/ifssupp.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/ifssupp.h (original)
+++ trunk/reactos/include/ndk/ifssupp.h Sun Sep 9 17:00:14 2007
@@ -103,7 +103,6 @@
LPC_PVOID ViewBase;
} REMOTE_PORT_VIEW, *PREMOTE_PORT_VIEW;
-#include <pshpack1.h>
typedef struct _KAPC_STATE
{
LIST_ENTRY ApcListHead[2];
@@ -112,7 +111,6 @@
BOOLEAN KernelApcPending;
BOOLEAN UserApcPending;
} KAPC_STATE, *PKAPC_STATE, *RESTRICTED_POINTER PRKAPC_STATE;
-#include <poppack.h>
typedef struct _KQUEUE
{
Modified: trunk/reactos/ntoskrnl/ke/apc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/apc.c?rev=2897…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/apc.c (original)
+++ trunk/reactos/ntoskrnl/ke/apc.c Sun Sep 9 17:00:14 2007
@@ -499,7 +499,7 @@
PKAPC_STATE NewState)
{
/* Restore backup of Original Environment */
- *NewState = *OldState;
+ RtlCopyMemory(NewState, OldState, KAPC_STATE_ACTUAL_LENGTH);
/* Repair Lists */
RepairList(NewState->ApcListHead, OldState->ApcListHead, KernelMode);