[NPFS]
authorCameron Gutman <aicommander@gmail.com>
Wed, 16 Nov 2011 04:39:49 +0000 (04:39 +0000)
committerCameron Gutman <aicommander@gmail.com>
Wed, 16 Nov 2011 04:39:49 +0000 (04:39 +0000)
- Execute the failure case while holding the mutex otherwise we crash

svn path=/trunk/; revision=54395

reactos/drivers/filesystems/npfs/rw.c

index a8fdaf6..e344fd8 100644 (file)
@@ -463,6 +463,8 @@ NpfsRead(IN PDEVICE_OBJECT DeviceObject,
                         NULL);
                     DPRINT("Finished waiting (%wZ)! Status: %x\n", &Ccb->Fcb->PipeName, Status);
 
+                    ExAcquireFastMutex(&Ccb->DataListLock);
+
                     if ((Status == STATUS_USER_APC) || (Status == STATUS_KERNEL_APC) || (Status == STATUS_ALERTED))
                     {
                         Status = STATUS_CANCELLED;
@@ -472,7 +474,6 @@ NpfsRead(IN PDEVICE_OBJECT DeviceObject,
                     {
                         ASSERT(FALSE);
                     }
-                    ExAcquireFastMutex(&Ccb->DataListLock);
                 }
                 else
                 {