The Linux Kernel Mailing List
 help / color / mirror / Atom feed
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: [syzbot] [f2fs?] kernel BUG in f2fs_put_super (6)
Date: Sat, 28 Nov 2026 23:03:43 -0800	[thread overview]
Message-ID: <6b0bce4f.417e6985.1597c7.009f.GAE@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    7cd8495c0f16 Merge tag 'io_uring-7.4-20261127' of git://gi..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15291b4d580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=ecf66ac0f0885fc5
dashboard link: https://syzkaller.appspot.com/bug?extid=467d56faa7809a907f05
compiler:       Debian clang version 22.1.8 (1~deb13u5), Debian LLD 22.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6882ee450f0f/disk-7cd8495c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2522d0f617b0/vmlinux-7cd8495c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d7bf9f20704c/bzImage-7cd8495c.xz

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 (loop2): 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: 9855 Comm: syz-executor 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 20 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:ffffc900060df8c0 EFLAGS: 00010296
RAX: fdbdcb890ea42100 RBX: dffffc0000000000 RCX: fdbdcb890ea42100
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900060dfb38 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: fffff52000c1bea1 R12: ffff88802a8b8084
R13: ffff88802a8b8087 R14: ffffffffffffffff R15: 0000000000000002
FS:  00005555614a9500(0000) GS:ffff8881247f8000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f146c9d7000 CR3: 000000003c794000 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
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 __exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
 exit_to_user_mode_loop+0x204/0x770 kernel/entry/common.c:101
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline]
 do_syscall_64+0x336/0x540 arch/x86/entry/syscall_64.c:107
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8ead2aadc7
Code: a2 c7 05 2c 69 25 00 00 00 00 00 eb 96 e8 b1 13 00 00 90 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffd4e9e6048 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 00007f8ead33955b RCX: 00007f8ead2aadc7
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffd4e9e6100
RBP: 00007ffd4e9e6100 R08: 00007ffd4e9e7100 R09: 00000000ffffffff
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd4e9e7190
R13: 00007f8ead33955b R14: 0000000000079cba R15: 00007ffd4e9e71d0
 </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 20 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:ffffc900060df8c0 EFLAGS: 00010296
RAX: fdbdcb890ea42100 RBX: dffffc0000000000 RCX: fdbdcb890ea42100
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900060dfb38 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: fffff52000c1bea1 R12: ffff88802a8b8084
R13: ffff88802a8b8087 R14: ffffffffffffffff R15: 0000000000000002
FS:  00005555614a9500(0000) GS:ffff8881247f8000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f146c9d7000 CR3: 000000003c794000 CR4: 00000000003526f0


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#ai-bisection

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

                 reply	other threads:[~2026-11-29  7:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=6b0bce4f.417e6985.1597c7.009f.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