done bcachefs (loop0): check_xattrs... bcachefs (loop0): key in missing inode, found keys: u64s 7 type xattr 536870912:3798421620223919902:U32_MAX len 0 ver 0: user.xattr2:xattr2 u64s 7 type xattr 536870912:9073845653939145521:U32_MAX len 0 ver 0: user.xattr1:xattr1 , fixing bcachefs (loop0): key in missing inode, found keys: u64s 7 type xattr 536870912:9073845653939145521:U32_MAX len 0 ver 0: user.xattr1:xattr1 , fixing done bcachefs (loop0): check_root... done bcachefs (loop0): check_unreachable_inodes... done bcachefs (loop0): check_subvolume_structure... done bcachefs (loop0): check_directory_structure... done bcachefs (loop0): check_nlinks... done bcachefs (loop0): check_rebalance_work... done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): set_fs_needs_rebalance... done bcachefs (loop0): Fixed errors, running fsck a second time to verify fs is clean bcachefs (loop0): check_alloc_info... done bcachefs (loop0): check_lrus... done bcachefs (loop0): check_btree_backpointers... done bcachefs (loop0): check_backpointers_to_extents... done bcachefs (loop0): check_extents_to_backpointers... done bcachefs (loop0): check_alloc_to_lru_refs... done bcachefs (loop0): bucket_gens_init... done bcachefs (loop0): check_snapshot_trees... done bcachefs (loop0): check_snapshots... done bcachefs (loop0): check_subvols... done bcachefs (loop0): check_subvol_children... done bcachefs (loop0): delete_dead_snapshots... done bcachefs (loop0): check_inodes... done bcachefs (loop0): check_extents... done bcachefs (loop0): check_indirect_extents... done bcachefs (loop0): check_dirents... done bcachefs (loop0): check_xattrs... done bcachefs (loop0): check_root... done bcachefs (loop0): check_unreachable_inodes... done bcachefs (loop0): check_subvolume_structure... done bcachefs (loop0): check_directory_structure... done bcachefs (loop0): check_nlinks... done bcachefs (loop0): check_rebalance_work... done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): set_fs_needs_rebalance... done bcachefs (loop0): reading quotas bcachefs (loop0): quotas done bcachefs (loop0): done starting filesystem ------------[ cut here ]------------ kernel BUG at fs/bcachefs/quota.c:232! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5363 Comm: syz.0.0 Not tainted syzkaller #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: d1 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 17 dd d1 fd e9 0c fb ff ff e8 7d e1 6c fd 90 <0f> 0b e8 75 e1 6c fd 90 0f 0b e8 6d e1 6c fd 90 0f 0b e8 65 e1 6c RSP: 0018:ffffc9000d34f278 EFLAGS: 00010287 RAX: ffffffff8452dcf3 RBX: ffffc9000d34f3a0 RCX: 0000000000100000 RDX: ffffc9000dc02000 RSI: 0000000000023392 RDI: 0000000000023393 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffffffffffe8 R10: dffffc0000000000 R11: fffffbfff1f87927 R12: ffffffffffffffe8 R13: ffffffffffffffe8 R14: 0000000000000000 R15: ffff888034057000 FS: 00007efe718f56c0(0000) GS:ffff88808d007000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2a10c0e000 CR3: 0000000042c0c000 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:3508 [inline] do_open fs/namei.c:3891 [inline] path_openat+0x306c/0x3830 fs/namei.c:4046 do_filp_open+0x1fa/0x410 fs/namei.c:4073 do_sys_openat2+0x121/0x1c0 fs/open.c:1435 do_sys_open fs/open.c:1450 [inline] __do_sys_creat fs/open.c:1528 [inline] __se_sys_creat fs/open.c:1522 [inline] __x64_sys_creat+0x8f/0xc0 fs/open.c:1522 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:0x7efe7098eec9 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:00007efe718f5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007efe70be5fa0 RCX: 00007efe7098eec9 RDX: 0000000000000000 RSI: 00000000000001ad RDI: 0000200000000140 RBP: 00007efe70a11f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007efe70be6038 R14: 00007efe70be5fa0 R15: 00007ffc6a0d0a98 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:bch2_quota_check_limit+0xd64/0xd90 fs/bcachefs/quota.c:232 Code: d1 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 17 dd d1 fd e9 0c fb ff ff e8 7d e1 6c fd 90 <0f> 0b e8 75 e1 6c fd 90 0f 0b e8 6d e1 6c fd 90 0f 0b e8 65 e1 6c RSP: 0018:ffffc9000d34f278 EFLAGS: 00010287 RAX: ffffffff8452dcf3 RBX: ffffc9000d34f3a0 RCX: 0000000000100000 RDX: ffffc9000dc02000 RSI: 0000000000023392 RDI: 0000000000023393 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffffffffffe8 R10: dffffc0000000000 R11: fffffbfff1f87927 R12: ffffffffffffffe8 R13: ffffffffffffffe8 R14: 0000000000000000 R15: ffff888034057000 FS: 00007efe718f56c0(0000) GS:ffff88808d007000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f4b0c249492 CR3: 0000000042c0c000 CR4: 0000000000352ef0