bcachefs (/dev/loop0): error reading default superblock: checksum error, type crc32c_nonzero: got 8c1ca219 should be 29d2fb78 bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=errors=continue,compression=lz4,nojournal_transaction_names bcachefs (loop0): recovering from clean shutdown, journal seq 7 bcachefs (loop0): Doing compatible version upgrade from 1.7: mi_btree_bitmap to 1.12: rebalance_work_acct_fix running recovery passes: check_allocations invalid bkey u64s 11 type alloc_v4 0:14:0 len 0 ver 0: gen 0 oldest_gen 0 data_type journal journal_seq 1 need_discard 1 need_inc_gen 1 dirty_sectors 256 stripe_sectors 0 cached_sectors 0 stripe 67108864 stripe_redundancy 0 io_time[READ] 1 io_time[WRITE] 1 fragmentation 0 bp_start 8 invalid data type (got 2 should be 7): delete?, fixing bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... done bcachefs (loop0): stripes_read... done bcachefs (loop0): snapshots_read... done bcachefs (loop0): check_allocations... btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 75277f57b0c8c24 written 32 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, fixing btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 19bc58a6c09b6540 written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0, fixing btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c18f4a4face03c6 written 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0, fixing btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 7675f41d391e5d36 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0, fixing btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq bcb9905dfb2993d5 written 16 min_key POS_MIN durability: 1 ptr: 0:32:0 gen 0, fixing btree ptr not marked in member info btree allocated bitmap u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 9a831b4a3f983356 written 32 min_key POS_MIN durability: 1 ptr: 0:29:0 gen 0, fixing bucket 0:14 gen 0 has wrong data_type: got free, should be journal, fixing bucket 0:14 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing done bcachefs (loop0): going read-write bcachefs (loop0): journal_replay... done bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): Fixed errors, running fsck a second time to verify fs is clean bcachefs (loop0): resume_logged_ops... done bcachefs (loop0): delete_dead_inodes... done bcachefs (loop0): done starting filesystem evm: overlay not supported ============================================ WARNING: possible recursive locking detected 6.11.0-syzkaller-11624-ge477dba5442c #0 Not tainted -------------------------------------------- syz.0.0/5110 is trying to acquire lock: ffff88804d8169d8 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: inode_lock include/linux/fs.h:815 [inline] ffff88804d8169d8 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: bch2_symlink+0x176/0x310 fs/bcachefs/fs.c:700 but task is already holding lock: ffff88804d814480 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: inode_lock include/linux/fs.h:815 [inline] ffff88804d814480 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: ovl_copy_up_workdir fs/overlayfs/copy_up.c:783 [inline] ffff88804d814480 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: ovl_do_copy_up fs/overlayfs/copy_up.c:1002 [inline] ffff88804d814480 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: ovl_copy_up_one fs/overlayfs/copy_up.c:1203 [inline] ffff88804d814480 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: ovl_copy_up_flags+0x1900/0x46f0 fs/overlayfs/copy_up.c:1258 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&sb->s_type->i_mutex_key#20); lock(&sb->s_type->i_mutex_key#20); *** DEADLOCK *** May be due to missing lock nesting notation 5 locks held by syz.0.0/5110: #0: ffff888033950420 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:515 #1: ffff88804d81e9e0 (&ovl_i_mutex_key[depth]){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:815 [inline] #1: ffff88804d81e9e0 (&ovl_i_mutex_key[depth]){+.+.}-{3:3}, at: vfs_setxattr+0x1e1/0x430 fs/xattr.c:320 #2: ffff88804d81ed98 (&ovl_i_lock_key[depth]){+.+.}-{3:3}, at: ovl_inode_lock_interruptible fs/overlayfs/overlayfs.h:657 [inline] #2: ffff88804d81ed98 (&ovl_i_lock_key[depth]){+.+.}-{3:3}, at: ovl_copy_up_start+0x53/0x310 fs/overlayfs/util.c:719 #3: ffff888033af0420 (sb_writers#11){.+.+}-{0:0}, at: ovl_copy_up_workdir fs/overlayfs/copy_up.c:782 [inline] #3: ffff888033af0420 (sb_writers#11){.+.+}-{0:0}, at: ovl_do_copy_up fs/overlayfs/copy_up.c:1002 [inline] #3: ffff888033af0420 (sb_writers#11){.+.+}-{0:0}, at: ovl_copy_up_one fs/overlayfs/copy_up.c:1203 [inline] #3: ffff888033af0420 (sb_writers#11){.+.+}-{0:0}, at: ovl_copy_up_flags+0x18e9/0x46f0 fs/overlayfs/copy_up.c:1258 #4: ffff88804d814480 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: inode_lock include/linux/fs.h:815 [inline] #4: ffff88804d814480 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: ovl_copy_up_workdir fs/overlayfs/copy_up.c:783 [inline] #4: ffff88804d814480 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: ovl_do_copy_up fs/overlayfs/copy_up.c:1002 [inline] #4: ffff88804d814480 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: ovl_copy_up_one fs/overlayfs/copy_up.c:1203 [inline] #4: ffff88804d814480 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: ovl_copy_up_flags+0x1900/0x46f0 fs/overlayfs/copy_up.c:1258 stack backtrace: CPU: 0 UID: 0 PID: 5110 Comm: syz.0.0 Not tainted 6.11.0-syzkaller-11624-ge477dba5442c #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3034 check_deadlock kernel/locking/lockdep.c:3086 [inline] validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3888 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5199 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5822 down_write+0x99/0x220 kernel/locking/rwsem.c:1579 inode_lock include/linux/fs.h:815 [inline] bch2_symlink+0x176/0x310 fs/bcachefs/fs.c:700 vfs_symlink+0x137/0x2e0 fs/namei.c:4615 ovl_do_symlink+0x85/0xd0 fs/overlayfs/overlayfs.h:267 ovl_create_real+0x346/0x550 fs/overlayfs/dir.c:206 ovl_copy_up_workdir fs/overlayfs/copy_up.c:784 [inline] ovl_do_copy_up fs/overlayfs/copy_up.c:1002 [inline] ovl_copy_up_one fs/overlayfs/copy_up.c:1203 [inline] ovl_copy_up_flags+0x193c/0x46f0 fs/overlayfs/copy_up.c:1258 ovl_xattr_set+0x348/0x520 fs/overlayfs/xattrs.c:56 __vfs_setxattr+0x468/0x4a0 fs/xattr.c:200 __vfs_setxattr_noperm+0x12e/0x660 fs/xattr.c:234 vfs_setxattr+0x221/0x430 fs/xattr.c:321 do_setxattr fs/xattr.c:629 [inline] path_setxattr+0x37e/0x4d0 fs/xattr.c:658 __do_sys_lsetxattr fs/xattr.c:683 [inline] __se_sys_lsetxattr fs/xattr.c:679 [inline] __x64_sys_lsetxattr+0xb8/0xd0 fs/xattr.c:679 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f48adf7dff9 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:00007f48aedc3038 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd RAX: ffffffffffffffda RBX: 00007f48ae135f80 RCX: 00007f48adf7dff9 RDX: 0000000020000280 RSI: 0000000020000240 RDI: 0000000020000180 RBP: 00007f48adff0296 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f48ae135f80 R15: 00007fff9c764d58