mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[0.4.11] Revert "[NTOSKRNL] Properly align VACB writes"
to avoid CORE-15384 "ros corrupts FAT16 partition"
This reverts commit 0.4.11-dev-210-g
2a80ae2bb6
This commit is contained in:
parent
b906163dc1
commit
78cd6265d9
1 changed files with 4 additions and 9 deletions
|
@ -81,7 +81,7 @@ NTAPI
|
|||
CcReadVirtualAddress (
|
||||
PROS_VACB Vacb)
|
||||
{
|
||||
ULONG Size;
|
||||
ULONG Size, Pages;
|
||||
PMDL Mdl;
|
||||
NTSTATUS Status;
|
||||
IO_STATUS_BLOCK IoStatus;
|
||||
|
@ -95,11 +95,10 @@ CcReadVirtualAddress (
|
|||
}
|
||||
Size = LargeSize.LowPart;
|
||||
|
||||
Size = ROUND_TO_PAGES(Size);
|
||||
ASSERT(Size <= VACB_MAPPING_GRANULARITY);
|
||||
ASSERT(Size > 0);
|
||||
Pages = BYTES_TO_PAGES(Size);
|
||||
ASSERT(Pages * PAGE_SIZE <= VACB_MAPPING_GRANULARITY);
|
||||
|
||||
Mdl = IoAllocateMdl(Vacb->BaseAddress, Size, FALSE, FALSE, NULL);
|
||||
Mdl = IoAllocateMdl(Vacb->BaseAddress, Pages * PAGE_SIZE, FALSE, FALSE, NULL);
|
||||
if (!Mdl)
|
||||
{
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
@ -178,10 +177,6 @@ CcWriteVirtualAddress (
|
|||
} while (++i < (Size >> PAGE_SHIFT));
|
||||
}
|
||||
|
||||
Size = ROUND_TO_PAGES(Size);
|
||||
ASSERT(Size <= VACB_MAPPING_GRANULARITY);
|
||||
ASSERT(Size > 0);
|
||||
|
||||
Mdl = IoAllocateMdl(Vacb->BaseAddress, Size, FALSE, FALSE, NULL);
|
||||
if (!Mdl)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue