Files
linux-stable-mirror/fs/ntfs3
Huacai Chen 2cac0df332 fs/ntfs3: Update log->page_{mask,bits} if log->page_size changed
commit 2fef55d8f7 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
..
2024-08-03 08:54:10 +02:00
2024-08-03 08:54:06 +02:00
2023-08-02 09:13:09 -06:00
2023-07-03 00:21:27 +04:00
2023-07-03 00:21:27 +04:00