summaryrefslogtreecommitdiff
path: root/rust/zerocopy/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2026-07-02 20:36:59 +0900
committerNamjae Jeon <linkinjeon@kernel.org>2026-07-06 20:26:03 +0900
commitf72df3a4c33b64de3418ec74d1ad4f028e09d161 (patch)
tree6c85eac08fd583e26d9f9827139858f0469e125d /rust/zerocopy/git@git.tavy.me:linux-stable.git
parenteb94f5a41a193a425e09a63cb75dffd151d8f42e (diff)
ntfs: make system files immutable to prevent corruption
When a system file such as $Bitmap is exposed via show_sys_files and written from userspace, the volume is corrupted and, because the cluster allocator scans $Bitmap through the same inode's page cache, a write to $Bitmap also deadlocks writeback against the folio it already holds locked. These files are maintained by the driver itself and have no valid reason to be written through the file interface. Mark base metadata files (mft_no < FILE_first_user) as immutable during inode read so the VFS rejects write, mmap, truncate and unlink with -EPERM. Directories are skipped so the root and $Extend remain usable. Internal metadata updates do not go through the VFS write path and are unaffected. Fixes: af0db57d4293 ("ntfs: update inode operations") Cc: stable@vger.kernel.org Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'rust/zerocopy/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions