Author: mjmartin Date: Fri Apr 10 01:10:04 2009 New Revision: 40432
URL: http://svn.reactos.org/svn/reactos?rev=40432&view=rev Log: - 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.
Modified: trunk/reactos/drivers/filesystems/npfs/rw.c
Modified: trunk/reactos/drivers/filesystems/npfs/rw.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs/rw... ============================================================================== --- trunk/reactos/drivers/filesystems/npfs/rw.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/npfs/rw.c [iso-8859-1] Fri Apr 10 01:10:04 2009 @@ -836,6 +836,17 @@ 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); }