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... dirent points to missing inode: u64s 8 type dirent 4096:9097378837824744618:U32_MAX len 0 ver 0: file.cold -> 536870914 type reg, fixing 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): 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): reconstruct_snapshots... 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): 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:319! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5324 Comm: syz.0.0 Not tainted 6.14.0-syzkaller-09352-g0c86b42439b6 #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_transfer fs/bcachefs/quota.c:319 [inline] RIP: 0010:bch2_quota_transfer+0xae6/0xb00 fs/bcachefs/quota.c:367 Code: 48 c7 c7 30 32 38 8f 4c 89 e6 e8 85 86 b8 00 e9 bb fd ff ff e8 bb cb 3e fd 90 0f 0b e8 b3 cb 3e fd 90 0f 0b e8 ab cb 3e fd 90 <0f> 0b e8 a3 cb 3e fd 90 0f 0b e8 3b 70 a3 07 66 66 2e 0f 1f 84 00 RSP: 0018:ffffc9000d38f640 EFLAGS: 00010287 RAX: ffffffff8484ce95 RBX: ffff888052b35590 RCX: 0000000000100000 RDX: ffffc9000e37a000 RSI: 0000000000003273 RDI: 0000000000003274 RBP: ffffc9000d38f7e8 R08: ffffffff8484cb56 R09: 0000000000000001 R10: dffffc0000000000 R11: fffffbfff20bc3ef R12: 0000000000000001 R13: 0000000000000000 R14: 1ffff11002443f85 R15: ffff88801221fc28 FS: 00007f3532b026c0(0000) GS:ffff88808c5dc000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00002000000017c0 CR3: 0000000040816000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bch2_fs_quota_transfer+0x282/0x4d0 fs/bcachefs/fs.c:160 bch2_setattr_nonsize+0x3c3/0x12a0 fs/bcachefs/fs.c:1099 notify_change+0xbca/0xe90 fs/attr.c:552 chown_common+0x503/0x850 fs/open.c:782 do_fchownat+0x16c/0x250 fs/open.c:813 __do_sys_lchown fs/open.c:838 [inline] __se_sys_lchown fs/open.c:836 [inline] __x64_sys_lchown+0x85/0xa0 fs/open.c:836 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f3531d8d169 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:00007f3532b02038 EFLAGS: 00000246 ORIG_RAX: 000000000000005e RAX: ffffffffffffffda RBX: 00007f3531fa5fa0 RCX: 00007f3531d8d169 RDX: 000000000000ee01 RSI: 000000000000ee00 RDI: 00002000000017c0 RBP: 00007f3531e0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3531fa5fa0 R15: 00007ffef5bd0678 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__bch2_quota_transfer fs/bcachefs/quota.c:319 [inline] RIP: 0010:bch2_quota_transfer+0xae6/0xb00 fs/bcachefs/quota.c:367 Code: 48 c7 c7 30 32 38 8f 4c 89 e6 e8 85 86 b8 00 e9 bb fd ff ff e8 bb cb 3e fd 90 0f 0b e8 b3 cb 3e fd 90 0f 0b e8 ab cb 3e fd 90 <0f> 0b e8 a3 cb 3e fd 90 0f 0b e8 3b 70 a3 07 66 66 2e 0f 1f 84 00 RSP: 0018:ffffc9000d38f640 EFLAGS: 00010287 RAX: ffffffff8484ce95 RBX: ffff888052b35590 RCX: 0000000000100000 RDX: ffffc9000e37a000 RSI: 0000000000003273 RDI: 0000000000003274 RBP: ffffc9000d38f7e8 R08: ffffffff8484cb56 R09: 0000000000000001 R10: dffffc0000000000 R11: fffffbfff20bc3ef R12: 0000000000000001 R13: 0000000000000000 R14: 1ffff11002443f85 R15: ffff88801221fc28 FS: 00007f3532b026c0(0000) GS:ffff88808c5dc000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f352e1f4fd8 CR3: 0000000040816000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400