unlock the CID in PsLookupProcessByProcessId, PsLookupProcessThreadByCid
and PsLookupThreadByThreadId when the lookup succeeded, not failed
Modified: trunk/reactos/ntoskrnl/ps/process.c
Modified: trunk/reactos/ntoskrnl/ps/thread.c
_____
Modified: trunk/reactos/ntoskrnl/ps/process.c
--- trunk/reactos/ntoskrnl/ps/process.c 2005-08-08 09:24:20 UTC (rev
17195)
+++ trunk/reactos/ntoskrnl/ps/process.c 2005-08-08 10:08:34 UTC (rev
17196)
@@ -366,7 +366,7 @@
DPRINT("Initialzing Process CID Handle\n");
CidEntry.u1.Object = Process;
CidEntry.u2.GrantedAccess = 0;
- Process->UniqueProcessId = (ExCreateHandle(PspCidTable,
&CidEntry));
+ Process->UniqueProcessId = ExCreateHandle(PspCidTable, &CidEntry);
DPRINT("Created CID: %d\n", Process->UniqueProcessId);
if(!Process->UniqueProcessId)
{
@@ -479,8 +479,8 @@
PAGED_CODE();
/* Get the CID Handle Entry */
- if (!(CidEntry = ExMapHandleToPointer(PspCidTable,
- ProcessId)))
+ if ((CidEntry = ExMapHandleToPointer(PspCidTable,
+ ProcessId)))
{
/* Get the Process */
FoundProcess = CidEntry->u1.Object;
@@ -517,7 +517,7 @@
PAGED_CODE();
/* Get the CID Handle Entry */
- if (!(CidEntry = ExMapHandleToPointer(PspCidTable,
+ if ((CidEntry = ExMapHandleToPointer(PspCidTable,
Cid->UniqueThread)))
{
/* Get the Process */
_____
Modified: trunk/reactos/ntoskrnl/ps/thread.c
--- trunk/reactos/ntoskrnl/ps/thread.c 2005-08-08 09:24:20 UTC (rev
17195)
+++ trunk/reactos/ntoskrnl/ps/thread.c 2005-08-08 10:08:34 UTC (rev
17196)
@@ -376,8 +376,8 @@
PAGED_CODE();
/* Get the CID Handle Entry */
- if (!(CidEntry = ExMapHandleToPointer(PspCidTable,
- ThreadId)))
+ if ((CidEntry = ExMapHandleToPointer(PspCidTable,
+ ThreadId)))
{
/* Get the Process */
FoundThread = CidEntry->u1.Object;
Show replies by date