VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Namjae Jeon <namjae.jeon@samsung.com> 2021-02-01 09:23:37 +0900 committer: Namjae Jeon <namjae.jeon@samsung.com> 2021-02-22 09:55:13 +0900 commit: 78c276f5495aa53a8beebb627e5bf6a54f0af34f parent: f40ddce88593482919761f74910f42f4b84c004b
Commit Summary:
exfat: fix shift-out-of-bounds in exfat_fill_super()
Diffstat:
1 file changed, 4 insertions, 0 deletions
diff --git a/fs/exfat/exfat_raw.h b/fs/exfat/exfat_raw.h
index 6aec6288e1f2..7f39b1c6469c 100644
--- a/fs/exfat/exfat_raw.h
+++ b/fs/exfat/exfat_raw.h
@@ -77,6 +77,10 @@
 
 #define EXFAT_FILE_NAME_LEN		15
 
+#define EXFAT_MIN_SECT_SIZE_BITS		9
+#define EXFAT_MAX_SECT_SIZE_BITS		12
+#define EXFAT_MAX_SECT_PER_CLUS_BITS(x)		(25 - (x)->sect_size_bits)
+
 /* EXFAT: Main and Backup Boot Sector (512 bytes) */
 struct boot_sector {
 	__u8	jmp_boot[BOOTSEC_JUMP_BOOT_LEN];