[ros-diffs] [dgorbachev] 26623: Do not crash on broken pipe.

dgorbachev at svn.reactos.org dgorbachev at svn.reactos.org
Wed May 2 05:06:19 CEST 2007


Author: dgorbachev
Date: Wed May  2 07:06:18 2007
New Revision: 26623

URL: http://svn.reactos.org/svn/reactos?rev=26623&view=rev
Log:
Do not crash on broken pipe.

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.c?rev=26623&r1=26622&r2=26623&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs/rw.c (original)
+++ trunk/reactos/drivers/filesystems/npfs/rw.c Wed May  2 07:06:18 2007
@@ -688,7 +688,6 @@
 				NULL);
 			DPRINT("Finished waiting (%S)! Status: %x\n", Fcb->PipeName.Buffer, Status);
 
-			ExAcquireFastMutex(&ReaderCcb->DataListLock);
 			/*
 			* It's possible that the event was signaled because the
 			* other side of pipe was closed.
@@ -697,9 +696,11 @@
 			{
 				DPRINT("PipeState: %x\n", Ccb->PipeState);
 				Status = STATUS_PIPE_BROKEN;
-				ExReleaseFastMutex(&ReaderCcb->DataListLock);
+				// ExReleaseFastMutex(&ReaderCcb->DataListLock);
 				goto done;
 			}
+
+			ExAcquireFastMutex(&ReaderCcb->DataListLock);
 		}
 
 		if (Fcb->WriteMode == FILE_PIPE_BYTE_STREAM_MODE)




More information about the Ros-diffs mailing list