mirror of
https://github.com/reactos/reactos.git
synced 2025-06-12 14:28:29 +00:00
[NTOS:EX]
- Try to fix CORE-11906 See issue 11906 for more details. svn path=/trunk/; revision=72528
This commit is contained in:
parent
06c287d000
commit
170bf20513
1 changed files with 49 additions and 26 deletions
|
@ -1241,6 +1241,8 @@ QSI_DEF(SystemHandleInformation)
|
|||
/* Enter a critical region */
|
||||
KeEnterCriticalRegion();
|
||||
|
||||
_SEH2_TRY
|
||||
{
|
||||
/* Set the initial value and loop the entries */
|
||||
Handle.Value = 0;
|
||||
while ((HandleTableEntry = ExpLookupHandleTableEntry(Process->ObjectTable, Handle)))
|
||||
|
@ -1251,31 +1253,52 @@ QSI_DEF(SystemHandleInformation)
|
|||
{
|
||||
/* Lock the entry */
|
||||
if (ExpLockHandleTableEntry(Process->ObjectTable, HandleTableEntry))
|
||||
{
|
||||
_SEH2_TRY
|
||||
{
|
||||
POBJECT_HEADER ObjectHeader = ObpGetHandleObject(HandleTableEntry);
|
||||
|
||||
/* Filling handle information */
|
||||
HandleInformation->Handles[Index].UniqueProcessId = (USHORT)(ULONG_PTR) Process->UniqueProcessId;
|
||||
HandleInformation->Handles[Index].CreatorBackTraceIndex = 0;
|
||||
HandleInformation->Handles[Index].ObjectTypeIndex = (UCHAR) ObjectHeader->Type->Index;
|
||||
HandleInformation->Handles[Index].HandleAttributes = HandleTableEntry->ObAttributes & OBJ_HANDLE_ATTRIBUTES;
|
||||
HandleInformation->Handles[Index].HandleValue = (USHORT)(ULONG_PTR) Handle.GenericHandleOverlay;
|
||||
HandleInformation->Handles[Index].Object = &ObjectHeader->Body;
|
||||
HandleInformation->Handles[Index].GrantedAccess = HandleTableEntry->GrantedAccess;
|
||||
HandleInformation->Handles[Index].UniqueProcessId =
|
||||
(USHORT)(ULONG_PTR) Process->UniqueProcessId;
|
||||
|
||||
/* Unlock it */
|
||||
ExUnlockHandleTableEntry(Process->ObjectTable, HandleTableEntry);
|
||||
HandleInformation->Handles[Index].CreatorBackTraceIndex = 0;
|
||||
|
||||
HandleInformation->Handles[Index].ObjectTypeIndex =
|
||||
(UCHAR) ObjectHeader->Type->Index;
|
||||
|
||||
HandleInformation->Handles[Index].HandleAttributes =
|
||||
HandleTableEntry->ObAttributes & OBJ_HANDLE_ATTRIBUTES;
|
||||
|
||||
HandleInformation->Handles[Index].HandleValue =
|
||||
(USHORT)(ULONG_PTR) Handle.GenericHandleOverlay;
|
||||
|
||||
HandleInformation->Handles[Index].Object = &ObjectHeader->Body;
|
||||
|
||||
HandleInformation->Handles[Index].GrantedAccess =
|
||||
HandleTableEntry->GrantedAccess;
|
||||
|
||||
++Index;
|
||||
}
|
||||
_SEH2_FINALLY
|
||||
{
|
||||
/* Unlock it */
|
||||
ExUnlockHandleTableEntry(Process->ObjectTable, HandleTableEntry);
|
||||
}
|
||||
_SEH2_END;
|
||||
}
|
||||
}
|
||||
|
||||
/* Go to the next entry */
|
||||
Handle.Value += sizeof(HANDLE);
|
||||
}
|
||||
|
||||
}
|
||||
_SEH2_FINALLY
|
||||
{
|
||||
/* Leave the critical region */
|
||||
KeLeaveCriticalRegion();
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
Process = PsGetNextProcess(Process);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue