OpenCloudOS-Kernel/fs/ntfs3
Huacai Chen 2cac0df332 fs/ntfs3: Update log->page_{mask,bits} if log->page_size changed
commit 2fef55d8f78383c8e6d6d4c014b9597375132696 upstream.

If an NTFS file system is mounted to another system with different
PAGE_SIZE from the original system, log->page_size will change in
log_replay(), but log->page_{mask,bits} don't change correspondingly.
This will cause a panic because "u32 bytes = log->page_size - page_off"
will get a negative value in the later read_log_page().

Cc: stable@vger.kernel.org
Fixes: b46acd6a6a ("fs/ntfs3: Add NTFS journal")
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-03 08:54:22 +02:00
..
lib
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile
attrib.c fs/ntfs3: Keep runs for $MFT::$ATTR_DATA and $MFT::$ATTR_BITMAP 2024-08-03 08:54:10 +02:00
attrlist.c fs/ntfs3: Use kvfree to free memory allocated by kvmalloc 2024-03-01 13:34:54 +01:00
bitfunc.c
bitmap.c fs/ntfs3: Missed error return 2024-08-03 08:54:10 +02:00
debug.h
dir.c fs/ntfs3: Fix getting file type 2024-08-03 08:54:06 +02:00
file.c fs/ntfs3: Replace inode_trylock with inode_lock 2024-08-03 08:54:07 +02:00
frecord.c fs/ntfs3: Merge synonym COMPRESSION_UNIT and NTFS_LZNT_CUNIT 2024-08-03 08:54:06 +02:00
fslog.c fs/ntfs3: Update log->page_{mask,bits} if log->page_size changed 2024-08-03 08:54:22 +02:00
fsntfs.c fs/ntfs3: Prevent generic message "attempt to access beyond end of device" 2024-03-01 13:34:54 +01:00
index.c fs/ntfs3: Fix field-spanning write in INDEX_HDR 2024-08-03 08:54:08 +02:00
inode.c fs/ntfs3: Correct undo if ntfs_create_inode failed 2024-08-03 08:54:07 +02:00
lznt.c fs/ntfs3: Code formatting 2023-07-03 00:21:27 +04:00
namei.c fs/ntfs3: Implement super_operations::shutdown 2024-03-01 13:34:53 +01:00
ntfs.h fs/ntfs3: Fix field-spanning write in INDEX_HDR 2024-08-03 08:54:08 +02:00
ntfs_fs.h fs/ntfs3: Prevent generic message "attempt to access beyond end of device" 2024-03-01 13:34:54 +01:00
record.c fs/ntfs3: Taking DOS names into account during link counting 2024-06-12 11:11:20 +02:00
run.c fs/ntfs3: Code formatting 2023-07-03 00:21:27 +04:00
super.c fs/ntfs3: Fix the format of the "nocase" mount option 2024-08-03 08:54:10 +02:00
upcase.c
xattr.c fs/ntfs3: Mark volume as dirty if xattr is broken 2024-07-11 12:49:19 +02:00