Author: fireball
Date: Tue Jul 16 22:37:01 2013
New Revision: 59495
URL:
http://svn.reactos.org/svn/reactos?rev=59495&view=rev
Log:
[NTOS]
- Fix CcMdlReadComplete2 prototype.
- Fix a bug in Dominique Cote's code: when performing FsRtlGetFileSize, the length of
the buffer should be set accordingly to the information class asked for, that is -
FILE_STANDARD_INFORMATION structure. Previous calculation formula makes no sense at all
and leads to memory corruption (if filesystem driver is stupid enough) or inability to get
file size (if filesystem driver is coded by good developers).
Modified:
trunk/reactos/ntoskrnl/cache/mdlsup.c
trunk/reactos/ntoskrnl/cache/newcc.h
trunk/reactos/ntoskrnl/cc/mdl.c
trunk/reactos/ntoskrnl/fsrtl/fastio.c
trunk/reactos/ntoskrnl/include/internal/cc.h
Modified: trunk/reactos/ntoskrnl/cache/mdlsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/mdlsup.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/mdlsup.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/mdlsup.c [iso-8859-1] Tue Jul 16 22:37:01 2013
@@ -80,8 +80,8 @@
VOID
NTAPI
-CcMdlReadComplete2(IN PMDL MdlChain,
- IN PFILE_OBJECT FileObject)
+CcMdlReadComplete2(IN PFILE_OBJECT FileObject,
+ IN PMDL MdlChain)
{
UNIMPLEMENTED
}
Modified: trunk/reactos/ntoskrnl/cache/newcc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/newcc.h?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/cache/newcc.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/newcc.h [iso-8859-1] Tue Jul 16 22:37:01 2013
@@ -44,8 +44,8 @@
VOID
NTAPI
-CcMdlReadComplete2(IN PMDL MemoryDescriptorList,
- IN PFILE_OBJECT FileObject);
+CcMdlReadComplete2(IN PFILE_OBJECT FileObject,
+ IN PMDL MemoryDescriptorList);
VOID
NTAPI
Modified: trunk/reactos/ntoskrnl/cc/mdl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/mdl.c?rev=5949…
==============================================================================
--- trunk/reactos/ntoskrnl/cc/mdl.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cc/mdl.c [iso-8859-1] Tue Jul 16 22:37:01 2013
@@ -51,8 +51,9 @@
VOID
NTAPI
CcMdlReadComplete2 (
- IN PMDL MemoryDescriptorList,
- IN PFILE_OBJECT FileObject)
+ IN PFILE_OBJECT FileObject,
+ IN PMDL MemoryDescriptorList
+)
{
PMDL Mdl;
@@ -104,7 +105,7 @@
}
/* Use slow path */
- CcMdlReadComplete2(MdlChain, FileObject);
+ CcMdlReadComplete2(FileObject, MdlChain);
}
/*
Modified: trunk/reactos/ntoskrnl/fsrtl/fastio.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/fastio.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/fastio.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/fsrtl/fastio.c [iso-8859-1] Tue Jul 16 22:37:01 2013
@@ -880,7 +880,7 @@
IoStackLocation->FileObject = FileObject;
IoStackLocation->DeviceObject = DeviceObject;
IoStackLocation->Parameters.QueryFile.Length =
- ALIGN_UP(sizeof(FILE_INFORMATION_CLASS), ULONG);
+ sizeof(FILE_STANDARD_INFORMATION);
IoStackLocation->Parameters.QueryFile.FileInformationClass =
FileStandardInformation;
@@ -1019,7 +1019,7 @@
IN PDEVICE_OBJECT DeviceObject)
{
/* Call the Cache Manager */
- CcMdlReadComplete2(MemoryDescriptorList, FileObject);
+ CcMdlReadComplete2(FileObject, MemoryDescriptorList);
return TRUE;
}
Modified: trunk/reactos/ntoskrnl/include/internal/cc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/cc.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/cc.h [iso-8859-1] Tue Jul 16 22:37:01 2013
@@ -172,8 +172,8 @@
VOID
NTAPI
CcMdlReadComplete2(
- IN PMDL MemoryDescriptorList,
- IN PFILE_OBJECT FileObject
+ IN PFILE_OBJECT FileObject,
+ IN PMDL MemoryDescriptorList
);
VOID