- Revert 28967, and fix the real issue where an overwrite occured (in KiMoveApcState()).

svn path=/trunk/; revision=28978
This commit is contained in:
Aleksey Bragin 2007-09-09 13:00:14 +00:00
parent 621fbe2cc1
commit 4521f6387a
3 changed files with 2 additions and 5 deletions

View file

@ -635,7 +635,6 @@ typedef struct _OBJECT_BASIC_INFORMATION
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 @@ typedef struct _KAPC_STATE {
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;

View file

@ -103,7 +103,6 @@ typedef struct _REMOTE_PORT_VIEW
LPC_PVOID ViewBase;
} REMOTE_PORT_VIEW, *PREMOTE_PORT_VIEW;
#include <pshpack1.h>
typedef struct _KAPC_STATE
{
LIST_ENTRY ApcListHead[2];
@ -112,7 +111,6 @@ typedef struct _KAPC_STATE
BOOLEAN KernelApcPending;
BOOLEAN UserApcPending;
} KAPC_STATE, *PKAPC_STATE, *RESTRICTED_POINTER PRKAPC_STATE;
#include <poppack.h>
typedef struct _KQUEUE
{

View file

@ -499,7 +499,7 @@ KiMoveApcState(PKAPC_STATE OldState,
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);