From: syzbot <syzbot+467d56faa7809a907f05@syzkaller.appspotmail.com>
To: chao@kernel.org, jaegeuk@kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [f2fs?] kernel BUG in f2fs_put_super (6)
Date: Sun, 29 Nov 2026 19:37:39 -0800 [thread overview]
Message-ID: <6b0cef83.3ba11d86.1c9c77.0006.GAE@google.com> (raw)
In-Reply-To: <6b0bce4f.417e6985.1597c7.009f.GAE@google.com>
syzbot has found a reproducer for the following issue on:
HEAD commit: 4f069ab1ec24 Merge tag 'scsi-fixes' of git://git.kernel.or..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=1141707e580000
kernel config: https://syzkaller.appspot.com/x/.config?x=fc1834b4a2e3ba54
dashboard link: https://syzkaller.appspot.com/bug?extid=467d56faa7809a907f05
compiler: Debian clang version 22.1.8 (1~deb13u5), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13f858cd580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17f858cd580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/66ff8e791620/disk-4f069ab1.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/35a2aede79e4/vmlinux-4f069ab1.xz
kernel image: https://storage.googleapis.com/syzbot-assets/408f236d215b/bzImage-4f069ab1.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/d914a2a47804/mount_0.gz
fsck result: failed (log: https://syzkaller.appspot.com/x/fsck.log?x=11f858cd580000)
The issue was bisected by AI to:
commit 2c8a4a28233482ad697db92d86da10fcb498eaf7
Author: Jaegeuk Kim <jaegeuk@kernel.org>
Date: Tue Nov 14 01:46:38 2017 +0000
f2fs: expose quota information in debugfs
reasoning: https://syzkaller.appspot.com/ai_job?id=afdc04f1-1f8f-4df0-b173-64508745fa2f
AI-generated root cause summary:
In f2fs, sbi->nr_caches[F2FS_DIRTY_QDATA] is incremented in
inode_inc_dirty_pages() and decremented in inode_dec_dirty_pages() conditionally
on IS_NOQUOTA(inode) (S_NOQUOTA), which assumes S_NOQUOTA cannot change while an
inode has dirty folios. However, f2fs_quota_on() flushes dirty pages via
filemap_fdatawrite()/filemap_fdatawait() without holding inode_lock,
filemap_invalidate_lock, or denying concurrent writes/mmap faults before
dquot_quota_on() -> vfs_setup_quota_inode() sets S_NOQUOTA on the inode. A folio
dirtied during that window increments F2FS_DIRTY_DATA without incrementing
F2FS_DIRTY_QDATA, and when subsequently written back or invalidated (including
by sync_filesystem() inside dquot_load_quota_sb()) after S_NOQUOTA is set,
inode_dec_dirty_pages() decrements both F2FS_DIRTY_DATA and F2FS_DIRTY_QDATA,
driving F2FS_DIRTY_QDATA to -1 and triggering f2fs_bug_on(sbi, 1) in
f2fs_put_super().
full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=467d56faa7809a907f05
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+467d56faa7809a907f05@syzkaller.appspotmail.com
The bisection result may be wrong.
If you agree with it, please also add:
Fixes: 2c8a4a282334 ("f2fs: expose quota information in debugfs")
F2FS-fs (loop3): detect filesystem reference count leak during umount, type: 2, count: -1, err: -5, cp_err: 1
------------[ cut here ]------------
kernel BUG at fs/f2fs/super.c:2084!
Oops: invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 1 UID: 0 PID: 5626 Comm: syz-executor204 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
RIP: 0010:f2fs_put_super+0x145a/0x1460 fs/f2fs/super.c:2084
Code: c1 e8 03 83 e0 01 48 8b 7c 24 18 31 f6 48 c7 c2 60 54 df 8b 44 89 f9 4d 89 f0 44 8b 4c 24 28 50 e8 fb 21 fd ff 48 83 c4 08 90 <0f> 0b 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc90004ce7800 EFLAGS: 00010296
RAX: 4b622689e1bfa200 RBX: dffffc0000000000 RCX: 4b622689e1bfa200
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90004ce7a78 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: fffff5200099ce89 R12: ffff88803621c084
R13: ffff88803621c087 R14: ffffffffffffffff R15: 0000000000000002
FS: 000055558cad3400(0000) GS:ffff8881247fa000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd8e1178fc CR3: 000000004635a000 CR4: 00000000003526f0
Call Trace:
<TASK>
generic_shutdown_super+0x140/0x2d0 fs/super.c:723
kill_block_super+0x44/0xa0 fs/super.c:1852
kill_f2fs_super+0x3b5/0x700 fs/f2fs/super.c:5788
deactivate_locked_super+0xbe/0x110 fs/super.c:558
cleanup_mnt+0x204/0x2a0 fs/namespace.c:1396
task_work_run+0x1d9/0x260 kernel/task_work.c:233
ptrace_notify+0x258/0x290 kernel/signal.c:2598
ptrace_report_syscall include/linux/ptrace.h:416 [inline]
ptrace_report_syscall_exit+0x2d/0x50 include/linux/ptrace.h:477
arch_ptrace_report_syscall_exit include/linux/entry-common.h:240 [inline]
syscall_exit_work include/linux/entry-common.h:273 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:304 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:341 [inline]
do_syscall_64+0x4c4/0x540 arch/x86/entry/syscall_64.c:107
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f13496c5717
Code: bf 41 4d 56 53 b8 9d 00 00 00 0f 05 83 f8 ea 75 a2 c7 05 b8 a3 0a 00 00 00 00 00 eb 96 e8 31 06 00 00 90 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 d0 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffd8e1178e8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000018830 RCX: 00007f13496c5717
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffd8e1179a0
RBP: 00007ffd8e1179a0 R08: 00007ffd8e1189a0 R09: 00000000ffffffff
R10: 0000000000000000 R11: 0000000000000206 R12: 00007ffd8e118a50
R13: 000055558cad4760 R14: 431bde82d7b634db R15: 00007ffd8e1189f4
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:f2fs_put_super+0x145a/0x1460 fs/f2fs/super.c:2084
Code: c1 e8 03 83 e0 01 48 8b 7c 24 18 31 f6 48 c7 c2 60 54 df 8b 44 89 f9 4d 89 f0 44 8b 4c 24 28 50 e8 fb 21 fd ff 48 83 c4 08 90 <0f> 0b 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc90004ce7800 EFLAGS: 00010296
RAX: 4b622689e1bfa200 RBX: dffffc0000000000 RCX: 4b622689e1bfa200
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90004ce7a78 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: fffff5200099ce89 R12: ffff88803621c084
R13: ffff88803621c087 R14: ffffffffffffffff R15: 0000000000000002
FS: 000055558cad3400(0000) GS:ffff8881246fa000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055558cadc798 CR3: 000000004635a000 CR4: 00000000003526f0
prev parent reply other threads:[~2026-11-30 3:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 7:03 syzbot
2026-11-30 3:37 ` syzbot [this message]
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=6b0cef83.3ba11d86.1c9c77.0006.GAE@google.com \
--to=syzbot+467d56faa7809a907f05@syzkaller.appspotmail.com \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®