mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
- Fix broken behavior of IoBuildPartialMdl, which instead of copying 4 flags from a source mdl to a target one was always setting all of them, thus often making resultant mdl unusable.
svn path=/trunk/; revision=38360
This commit is contained in:
parent
d3a5bca37f
commit
65dc6d8f5c
1 changed files with 5 additions and 4 deletions
|
@ -98,6 +98,10 @@ IoBuildPartialMdl(IN PMDL SourceMdl,
|
|||
PPFN_NUMBER TargetPages = (PPFN_NUMBER)(TargetMdl + 1);
|
||||
PPFN_NUMBER SourcePages = (PPFN_NUMBER)(SourceMdl + 1);
|
||||
ULONG Offset;
|
||||
ULONG FlagsMask = (MDL_IO_PAGE_READ |
|
||||
MDL_SOURCE_IS_NONPAGED_POOL |
|
||||
MDL_MAPPED_TO_SYSTEM_VA |
|
||||
MDL_IO_SPACE);
|
||||
|
||||
/* Calculate the offset */
|
||||
Offset = (ULONG)((ULONG_PTR)VirtualAddress -
|
||||
|
@ -118,10 +122,7 @@ IoBuildPartialMdl(IN PMDL SourceMdl,
|
|||
|
||||
/* Set the MDL Flags */
|
||||
TargetMdl->MdlFlags = (MDL_ALLOCATED_FIXED_SIZE | MDL_ALLOCATED_MUST_SUCCEED);
|
||||
TargetMdl->MdlFlags |= (MDL_IO_PAGE_READ |
|
||||
MDL_SOURCE_IS_NONPAGED_POOL |
|
||||
MDL_MAPPED_TO_SYSTEM_VA |
|
||||
MDL_IO_SPACE);
|
||||
TargetMdl->MdlFlags |= SourceMdl->MdlFlags & FlagsMask;
|
||||
TargetMdl->MdlFlags |= MDL_PARTIAL;
|
||||
|
||||
/* Set the mapped VA */
|
||||
|
|
Loading…
Reference in a new issue