Re: [syzbot] [exfat?] INFO: task hung in exfat_sync_fs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



#syz test
From e89c336b835e5b9170b518cf5eea98ea53f49f4b Mon Sep 17 00:00:00 2001
From: Yuezhang Mo <Yuezhang.Mo@xxxxxxxx>
Date: Thu, 12 Dec 2024 11:15:37 +0800
Subject: [PATCH v1] exfat: add loop chek for the cluster chain of root

---
 fs/exfat/fatent.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/exfat/fatent.c b/fs/exfat/fatent.c
index 5d8b7413d80d..0b49e6878222 100644
--- a/fs/exfat/fatent.c
+++ b/fs/exfat/fatent.c
@@ -455,6 +455,9 @@ int exfat_count_num_clusters(struct super_block *sb,
 			break;
 	}
 
+	if (i == sbi->num_clusters)
+		return -EIO;
+
 	*ret_count = count;
 	return 0;
 }
-- 
2.43.0


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux