From: David Timber <dxdt@dev.snart.me>
To: syzbot <syzbot+cae7809e9dc1459e4e63@syzkaller.appspotmail.com>
Cc: linux-f2fs-devel@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mm?] [f2fs?] [exfat?] memory leak in __kfree_rcu_sheaf
Date: Tue, 5 May 2026 05:17:44 +0900 [thread overview]
Message-ID: <2956b248-c79f-4eae-8bfc-81178b5899af@dev.snart.me> (raw)
In-Reply-To: <698a26d3.050a0220.3b3015.007e.GAE@google.com>
[-- Attachment #1: Type: text/plain, Size: 9 bytes --]
#syz test
[-- Attachment #2: syz-cae7809e9dc1459e4e63.f2fs-use-after-free.patch --]
[-- Type: text/x-patch, Size: 1476 bytes --]
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index c4c225e09dc4..5a38b74757ca 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -4595,6 +4595,8 @@ void f2fs_handle_error(struct f2fs_sb_info *sbi, unsigned char error)
return;
if (!test_bit(error, (unsigned long *)sbi->errors))
return;
+
+ f2fs_notice(sbi, "s_error_work scheduled in f2fs_handle_error() by sbi at %p", sbi);
schedule_work(&sbi->s_error_work);
}
@@ -4621,6 +4623,7 @@ void f2fs_handle_critical_error(struct f2fs_sb_info *sbi, unsigned char reason)
* in order to avoid potential deadlock when running into
* f2fs_record_stop_reason() synchronously.
*/
+ f2fs_notice(sbi, "s_error_work scheduled in f2fs_handle_critical_error() by sbi at %p", sbi);
schedule_work(&sbi->s_error_work);
}
@@ -4666,6 +4669,10 @@ static void f2fs_record_error_work(struct work_struct *work)
struct f2fs_sb_info *sbi = container_of(work,
struct f2fs_sb_info, s_error_work);
+ f2fs_notice(sbi, "f2fs_record_error_work()");
+ if (unlikely(is_sbi_flag_set(sbi, SBI_IS_CLOSE)))
+ panic("!!! sbi at %p used after freeing !!!", sbi);
+
f2fs_record_stop_reason(sbi);
}
@@ -5454,6 +5461,7 @@ static void kill_f2fs_super(struct super_block *sb)
kill_block_super(sb);
/* Release block devices last, after fscrypt_destroy_keyring(). */
if (sbi) {
+ f2fs_notice(sbi, "freeing sbi at %px in kill_f2fs_super()", sbi);
destroy_device_list(sbi);
kfree(sbi);
sb->s_fs_info = NULL;
next prev parent reply other threads:[~2026-05-04 20:17 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-09 18:26 [syzbot] [mm?] [f2fs?] [exfat?] memory leak in __kfree_rcu_sheaf syzbot
2026-03-02 3:41 ` Qing Wang
2026-03-02 3:57 ` syzbot
2026-03-02 8:39 ` Vlastimil Babka (SUSE)
2026-03-04 1:30 ` Harry Yoo
2026-03-04 13:39 ` Vlastimil Babka (SUSE)
2026-03-06 19:35 ` Catalin Marinas
2026-03-08 11:02 ` Catalin Marinas
2026-03-08 12:31 ` syzbot
2026-03-08 11:04 ` Catalin Marinas
2026-03-08 12:42 ` syzbot
2026-03-09 10:46 ` Harry Yoo
2026-03-09 11:11 ` syzbot
2026-03-09 12:17 ` Harry Yoo
2026-03-09 20:31 ` Catalin Marinas
2026-03-11 3:04 ` Harry Yoo
2026-03-11 3:20 ` Harry Yoo
2026-03-10 3:39 ` Harry Yoo
2026-03-10 3:54 ` syzbot
2026-03-10 6:11 ` Harry Yoo
2026-03-10 6:29 ` syzbot
2026-03-10 8:10 ` Harry Yoo
2026-03-10 9:40 ` syzbot
2026-03-18 2:34 ` Harry Yoo
2026-03-18 3:08 ` syzbot
2026-03-18 4:10 ` Harry Yoo
2026-03-18 5:02 ` syzbot
2026-03-11 9:57 ` Qing Wang
2026-03-11 10:17 ` syzbot
2026-03-11 10:48 ` Qing Wang
2026-03-11 11:03 ` syzbot
2026-03-11 11:23 ` Harry Yoo
2026-03-20 0:06 ` Harry Yoo
2026-03-20 10:34 ` syzbot
2026-03-20 11:20 ` Harry Yoo
2026-05-02 10:09 ` David Timber
2026-05-02 10:17 ` Forwarded: " syzbot
2026-05-03 6:00 ` David Timber
2026-05-03 7:17 ` [syzbot] [mm?] [exfat?] [f2fs?] " syzbot
2026-05-03 6:05 ` [syzbot] [mm?] [f2fs?] [exfat?] " David Timber
2026-05-03 7:27 ` [syzbot] [mm?] [exfat?] [f2fs?] " syzbot
2026-05-03 7:41 ` David Timber
2026-05-04 20:17 ` David Timber [this message]
2026-05-04 20:51 ` syzbot
2026-05-04 20:26 ` [syzbot] [mm?] [f2fs?] [exfat?] " David Timber
2026-05-04 21:12 ` [syzbot] [mm?] [exfat?] [f2fs?] " syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2956b248-c79f-4eae-8bfc-81178b5899af@dev.snart.me \
--to=dxdt@dev.snart.me \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=syzbot+cae7809e9dc1459e4e63@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox