Author: pschweitzer
Date: Mon May 25 17:06:00 2015
New Revision: 67910
URL:
http://svn.reactos.org/svn/reactos?rev=67910&view=rev
Log:
[NTFS]
Acquire FCB resource (shared) before trying to attempt its data
Modified:
trunk/reactos/drivers/filesystems/ntfs/finfo.c
Modified: trunk/reactos/drivers/filesystems/ntfs/finfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/finfo.c [iso-8859-1] Mon May 25 17:06:00 2015
@@ -246,6 +246,12 @@
SystemBuffer = Irp->AssociatedIrp.SystemBuffer;
BufferLength = Stack->Parameters.QueryFile.Length;
+ if (!ExAcquireResourceSharedLite(&Fcb->MainResource,
+ (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ {
+ return NtfsMarkIrpContextForQueue(IrpContext);
+ }
+
switch (FileInformationClass)
{
case FileStandardInformation:
@@ -301,6 +307,8 @@
Status = STATUS_INVALID_PARAMETER;
}
+ ExReleaseResourceLite(&Fcb->MainResource);
+
if (NT_SUCCESS(Status))
Irp->IoStatus.Information =
Stack->Parameters.QueryFile.Length - BufferLength;