- rw.c: After the write wait has been satisfied, check that the pipe is not closed before trying to acquire the mutex. Fix bug #4351.

svn path=/trunk/; revision=40432
This commit is contained in:
Michael Martin 2009-04-09 21:10:04 +00:00
parent 59048535b7
commit 418ee7239b

View file

@ -836,6 +836,17 @@ NpfsWrite(PDEVICE_OBJECT DeviceObject,
Status = STATUS_PIPE_BROKEN;
goto done;
}
/* Check that the pipe has not been closed */
if (ReaderCcb->PipeState != FILE_PIPE_CONNECTED_STATE)
{
/* If the other side is valid, fire event */
if (Ccb)
{
KeResetEvent(&Ccb->WriteEvent);
}
Status = STATUS_PIPE_BROKEN;
goto done;
}
ExAcquireFastMutex(&ReaderCcb->DataListLock);
}