Re: [syzbot] [mm?] [f2fs?] [exfat?] memory leak in __kfree_rcu_sheaf

David Timber
2026-05-03T06:00:27Z

[-- Attachment #1: Type: text/plain, Size: 9 bytes --]

#syz test

[-- Attachment #2: syz-cae7809e9dc1459e4e63.patch --]
[-- Type: text/x-patch, Size: 545 bytes --]

diff --git a/fs/exfat/super.c b/fs/exfat/super.c
index 95d87e2d7717..df10d9a79a29 100644
--- a/fs/exfat/super.c
+++ b/fs/exfat/super.c
@@ -656,6 +656,7 @@ static int __exfat_fill_super(struct super_block *sb,
free_alloc_bitmap:
exfat_free_bitmap(sbi);
free_bh:
+ exfat_free_upcase_table(sbi);
brelse(sbi->boot_bh);
return ret;
}
@@ -752,6 +753,7 @@ static int exfat_get_tree(struct fs_context *fc)

static void exfat_free_sbi(struct exfat_sb_info *sbi)
{
+ exfat_free_upcase_table(sbi);
exfat_free_iocharset(sbi);
kfree(sbi);
}

[-- Attachment #3: syz-cae7809e9dc1459e4e63.f2fs-crippled.patch --]
[-- Type: text/x-patch, Size: 468 bytes --]

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index c4c225e09dc4..fd2499fe156b 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -5388,7 +5388,10 @@ static int f2fs_fill_super(struct super_block *sb, struct fs_context *fc)

static int f2fs_get_tree(struct fs_context *fc)
{
- return get_tree_bdev(fc, f2fs_fill_super);
+ if (true)
+ return -ENOMEM;
+ else
+ return get_tree_bdev(fc, f2fs_fill_super);
}

static int f2fs_reconfigure(struct fs_context *fc)