mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
- Activate the Grim Reaper and remove a hard-coded bugcheck. This fixes random bugchecks and especially bugchecks on shutdown.
svn path=/trunk/; revision=22697
This commit is contained in:
parent
4c630fdc31
commit
9478fc9049
4 changed files with 18 additions and 20 deletions
|
@ -728,12 +728,7 @@ ObpCreateHandle(IN OB_OPEN_REASON OpenReason,
|
|||
ObjectHeader->PointerCount);
|
||||
|
||||
/* Check if the types match */
|
||||
if ((Type) && (ObjectType != Type))
|
||||
{
|
||||
/* They don't; fail */
|
||||
DPRINT1("Type mismatch: %wZ, %wZ\n", &ObjectType->Name, &Type->Name);
|
||||
return STATUS_OBJECT_TYPE_MISMATCH;
|
||||
}
|
||||
if ((Type) && (ObjectType != Type)) return STATUS_OBJECT_TYPE_MISMATCH;
|
||||
|
||||
/* Check if this is a kernel handle */
|
||||
if ((HandleAttributes & OBJ_KERNEL_HANDLE) && (AccessMode == KernelMode))
|
||||
|
|
|
@ -163,7 +163,7 @@ ObpReapObject(IN PVOID Parameter)
|
|||
PVOID NextObject;
|
||||
|
||||
/* Start reaping */
|
||||
while((ReapObject = InterlockedExchangePointer(&ObpReaperList, NULL)))
|
||||
while ((ReapObject = InterlockedExchangePointer(&ObpReaperList, NULL)))
|
||||
{
|
||||
/* Start deletion loop */
|
||||
do
|
||||
|
@ -176,7 +176,7 @@ ObpReapObject(IN PVOID Parameter)
|
|||
|
||||
/* Move to the next one */
|
||||
ReapObject = NextObject;
|
||||
} while(NextObject != NULL);
|
||||
} while (NextObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -266,7 +266,6 @@ ObpCaptureObjectName(IN OUT PUNICODE_STRING CapturedName,
|
|||
(StringLength == (MAXUSHORT - sizeof(UNICODE_NULL) + 1)))
|
||||
{
|
||||
/* PS: Please keep the checks above expanded for clarity */
|
||||
DPRINT1("Invalid String Length\n");
|
||||
Status = STATUS_OBJECT_NAME_INVALID;
|
||||
}
|
||||
else
|
||||
|
@ -305,7 +304,6 @@ ObpCaptureObjectName(IN OUT PUNICODE_STRING CapturedName,
|
|||
else
|
||||
{
|
||||
/* Fail */
|
||||
DPRINT1("Out of Memory!\n");
|
||||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
}
|
||||
|
@ -523,7 +521,7 @@ ObpAllocateObject(IN POBJECT_CREATE_INFORMATION ObjectCreateInfo,
|
|||
}
|
||||
|
||||
/* Initialize the Object Name Info */
|
||||
if (HasNameInfo)
|
||||
if (HasNameInfo)
|
||||
{
|
||||
NameInfo = (POBJECT_HEADER_NAME_INFO)Header;
|
||||
NameInfo->Name = *ObjectName;
|
||||
|
@ -757,8 +755,17 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName,
|
|||
sizeof(OBJECT_TYPE) + sizeof(OBJECT_HEADER),
|
||||
KernelMode,
|
||||
(POBJECT_HEADER*)&Header);
|
||||
if (!NT_SUCCESS(Status)) return Status;
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
/* Free the name and fail */
|
||||
ExFreePool(ObjectName.Buffer);
|
||||
return Status;
|
||||
}
|
||||
|
||||
/* Setup the flags and name */
|
||||
LocalObjectType = (POBJECT_TYPE)&Header->Body;
|
||||
LocalObjectType->Name = ObjectName;
|
||||
Header->Flags |= OB_FLAG_KERNEL_MODE | OB_FLAG_PERMANENT;
|
||||
|
||||
/* Check if this is the first Object Type */
|
||||
if (!ObTypeObjectType)
|
||||
|
@ -778,14 +785,10 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName,
|
|||
LocalObjectType->Key = *(PULONG)Tag;
|
||||
}
|
||||
|
||||
/* Set it up */
|
||||
/* Set up the type information */
|
||||
LocalObjectType->TypeInfo = *ObjectTypeInitializer;
|
||||
LocalObjectType->Name = *TypeName;
|
||||
LocalObjectType->TypeInfo.PoolType = ObjectTypeInitializer->PoolType;
|
||||
|
||||
/* These two flags need to be manually set up */
|
||||
Header->Flags |= OB_FLAG_KERNEL_MODE | OB_FLAG_PERMANENT;
|
||||
|
||||
/* Check if we have to maintain a type list */
|
||||
if (NtGlobalFlag & FLG_MAINTAIN_OBJECT_TYPELIST)
|
||||
{
|
||||
|
|
|
@ -122,7 +122,6 @@ ObfDereferenceObject(IN PVOID Object)
|
|||
Header->NextToFree);
|
||||
|
||||
/* Queue the work item */
|
||||
KeBugCheck(0);
|
||||
ExQueueWorkItem(&ObpReaperWorkItem, DelayedWorkQueue);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,9 +151,10 @@ NtWaitForMultipleObjects(IN ULONG ObjectCount,
|
|||
}
|
||||
|
||||
/* Get a pointer to it */
|
||||
if (!(HandleEntry = ExMapHandleToPointer(HandleTable, Handles[i])))
|
||||
HandleEntry = ExMapHandleToPointer(HandleTable, Handles[i]);
|
||||
if (!HandleEntry)
|
||||
{
|
||||
DPRINT1("Invalid handle\n");
|
||||
/* Fail, handle is invalid */
|
||||
Status = STATUS_INVALID_HANDLE;
|
||||
goto Quickie;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue