Fix mutex unlocking in NpfsWaiterThread and add ASSERT.

svn path=/trunk/; revision=17154
This commit is contained in:
Filip Navara 2005-08-07 10:08:25 +00:00
parent 47d6deb829
commit 208dc4dcab

View file

@ -184,6 +184,7 @@ NpfsWaiterThread(PVOID InitContext)
ThreadContext->Count++; ThreadContext->Count++;
ThreadContext->DeviceExt->EmptyWaiterCount--; ThreadContext->DeviceExt->EmptyWaiterCount--;
} }
KeUnlockMutex(&ThreadContext->DeviceExt->PipeListLock);
break; break;
default: default:
KEBUGCHECK(0); KEBUGCHECK(0);
@ -204,7 +205,6 @@ NpfsWaiterThread(PVOID InitContext)
Terminate = TRUE; Terminate = TRUE;
} }
} }
KeUnlockMutex(&ThreadContext->DeviceExt->PipeListLock);
ExFreePool(ThreadContext); ExFreePool(ThreadContext);
} }
@ -400,6 +400,7 @@ NpfsRead(IN PDEVICE_OBJECT DeviceObject,
{ {
if (Fcb->PipeState == FILE_PIPE_CONNECTED_STATE) if (Fcb->PipeState == FILE_PIPE_CONNECTED_STATE)
{ {
ASSERT(Fcb->OtherSide != NULL);
KeSetEvent(&Fcb->OtherSide->WriteEvent, IO_NO_INCREMENT, FALSE); KeSetEvent(&Fcb->OtherSide->WriteEvent, IO_NO_INCREMENT, FALSE);
} }
if (Information > 0 && if (Information > 0 &&