Message ID | 20221014084837.1787196-7-hrkanabar@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fs: Debug config option to disable filesystem checksum verification for fuzzing | expand |
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index 001f4e053c85..428c65ce9a80 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c @@ -582,7 +582,8 @@ static bool is_boot_sector_ntfs(const struct super_block *sb, for (i = 0, u = (le32*)b; u < (le32*)(&b->checksum); ++u) i += le32_to_cpup(u); - if (le32_to_cpu(b->checksum) != i) + if (!IS_ENABLED(CONFIG_DISABLE_FS_CSUM_VERIFICATION) && + le32_to_cpu(b->checksum) != i) ntfs_warning(sb, "Invalid boot sector checksum."); } /* Check OEMidentifier is "NTFS " */