reactos/ntoskrnl/mm
Jérôme Gardou 573d579873
[NTOSKRNL] Flush file to disk when deleting file mappings (#4302)
CORE-17627
When closing a file, fastfat zeroes it out from ValidDataLength up to the end of the file.
The ValidDataLength field is updated when the file content is actually written to disk.
There is currently a race between the file-close path and the page out path, leading to potential file corruptions when the zeroing happens after the memory has been flushed to disk.

Fix this by actually flushing the file to disk when unmapping files, with file lock acquired. This way, the FS driver cannot zero out the tail of the file while we're actually flushing it to disk.
2023-04-01 23:56:49 +09:00
..
amd64 [NTOS] Move two CODE_SEG("INIT") to a better place. 2021-09-05 21:22:45 +02:00
arm [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build 2021-05-12 11:04:29 +02:00
ARM3 [NTOS:MM] Simplify definitions of MM_SYSLDR_NO_IMPORTS and MM_SYSLDR_BOOT_LOADED. 2023-03-18 03:42:31 +01:00
i386 Remove '.html' from spdx.org license page URLs. (#4845) 2022-11-03 18:25:37 +01:00
balance.c [NTOS:MM] Implement PeakCommitment (MmPeakCommitment, MmTotalCommittedPages) (#4650) 2022-09-12 14:22:52 +02:00
freelist.c [NTOS:MM] Fix another instance of reentrant spinlock acquisition 2021-06-29 11:49:20 +02:00
marea.c [NTOS] Add some sanity checks when synchronizing PDEs 2022-09-17 13:48:56 +02:00
mmfault.c [NTOS:MM] Fix a bit the page-out/page-in logic 2021-04-08 15:40:37 +02:00
mminit.c [NTOS:MM] Make the page LRU list a real LRU list. 2021-02-03 09:41:23 +01:00
pagefile.c [SMSS][NTOS:MM] Implement the architecture-specific pagefile size limits + code review. (#4843) 2022-11-16 21:54:31 +01:00
region.c Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
rmap.c [NTOS] Add some sanity checks when synchronizing PDEs 2022-09-17 13:48:56 +02:00
section.c [NTOSKRNL] Flush file to disk when deleting file mappings (#4302) 2023-04-01 23:56:49 +09:00
shutdown.c [NTOS:MM] Flush dirty pages after closing the page files. 2021-02-10 11:14:19 +01:00