------------[ cut here ]------------ kernel BUG at fs/bcachefs/quota.c:232! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5347 Comm: syz.0.0 Not tainted 6.16.0-rc4-syzkaller-00308-ga79a588fc176 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:bch2_quota_check_limit+0xd64/0xd90 fs/bcachefs/quota.c:232 Code: d7 fd e9 19 fb ff ff 48 8b 0c 24 80 e1 07 38 c1 0f 8c 1a fb ff ff 48 8b 3c 24 e8 97 9c d7 fd e9 0c fb ff ff e8 4d 1a 74 fd 90 <0f> 0b e8 45 1a 74 fd 90 0f 0b e8 3d 1a 74 fd 90 0f 0b e8 35 1a 74 RSP: 0018:ffffc900019e7278 EFLAGS: 00010287 RAX: ffffffff844c4443 RBX: ffffc900019e73a0 RCX: 0000000000100000 RDX: ffffc9000e98b000 RSI: 0000000000015486 RDI: 0000000000015487 RBP: 0000000000000000 R08: 0000000000000000 R09: fffffffffffffff8 R10: dffffc0000000000 R11: fffffbfff1f43cff R12: fffffffffffffff8 R13: fffffffffffffff8 R14: 0000000000000000 R15: ffff88801a20b400 FS: 00007ff1471206c0(0000) GS:ffff88808d21c000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000200000001000 CR3: 000000004441f000 CR4: 0000000000352ef0 Call Trace: bch2_quota_acct+0x3ed/0x750 fs/bcachefs/quota.c:299 __bch2_i_sectors_acct+0x2b3/0x4a0 fs/bcachefs/fs-io.c:180 bch2_i_sectors_acct fs/bcachefs/fs-io.h:138 [inline] bchfs_truncate+0x8f3/0xc20 fs/bcachefs/fs-io.c:512 notify_change+0xb36/0xe40 fs/attr.c:552 do_truncate+0x1a4/0x220 fs/open.c:68 handle_truncate fs/namei.c:3517 [inline] do_open fs/namei.c:3900 [inline] path_openat+0x306c/0x3830 fs/namei.c:4055 do_filp_open+0x1fa/0x410 fs/namei.c:4082 do_sys_openat2+0x121/0x1c0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_creat fs/open.c:1530 [inline] __se_sys_creat fs/open.c:1524 [inline] __x64_sys_creat+0x8f/0xc0 fs/open.c:1524 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff14638e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff147120038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007ff1465b6080 RCX: 00007ff14638e929 RDX: 0000000000000000 RSI: 000000000000000d RDI: 0000200000000240 RBP: 00007ff146410b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ff1465b6080 R15: 00007ffc34ed33b8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_quota_check_limit+0xd64/0xd90 fs/bcachefs/quota.c:232 Code: d7 fd e9 19 fb ff ff 48 8b 0c 24 80 e1 07 38 c1 0f 8c 1a fb ff ff 48 8b 3c 24 e8 97 9c d7 fd e9 0c fb ff ff e8 4d 1a 74 fd 90 <0f> 0b e8 45 1a 74 fd 90 0f 0b e8 3d 1a 74 fd 90 0f 0b e8 35 1a 74 RSP: 0018:ffffc900019e7278 EFLAGS: 00010287 RAX: ffffffff844c4443 RBX: ffffc900019e73a0 RCX: 0000000000100000 RDX: ffffc9000e98b000 RSI: 0000000000015486 RDI: 0000000000015487 RBP: 0000000000000000 R08: 0000000000000000 R09: fffffffffffffff8 R10: dffffc0000000000 R11: fffffbfff1f43cff R12: fffffffffffffff8 R13: fffffffffffffff8 R14: 0000000000000000 R15: ffff88801a20b400 FS: 00007ff1471206c0(0000) GS:ffff88808d21c000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ff13acef000 CR3: 000000004441f000 CR4: 0000000000352ef0