loop0: detected capacity change from 0 to 32768 ======================================================= WARNING: The mand mount option has been deprecated and and is ignored by this kernel. Remove the mand option from the mount to silence this warning. ======================================================= bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=xxhash,compression=lz4,str_hash=crc64,norecovery,nojournal_transaction_names,reconstruct_alloc bcachefs (loop0): recovering from clean shutdown, journal seq 10 bcachefs (loop0): Version upgrade required: Version upgrade from 0.24: unwritten_extents to 1.7: mi_btree_bitmap incomplete Doing incompatible version upgrade from 0.24: unwritten_extents to 1.13: inode_has_child_snapshots running recovery passes: check_allocations,check_alloc_info,check_lrus,check_btree_backpointers,check_backpointers_to_extents,check_extents_to_backpointers,check_alloc_to_lru_refs,bucket_gens_init,check_snapshot_trees,check_snapshots,check_subvols,check_subvol_children,delete_dead_snapshots,check_inodes,check_extents,check_indirect_extents,check_dirents,check_xattrs,check_root,check_unreachable_inodes,check_subvolume_structure,check_directory_structure,check_nlinks,set_fs_needs_rebalance bcachefs (loop0): dropping and reconstructing all alloc info bcachefs (loop0): accounting_read... done bcachefs (loop0): alloc_read... done bcachefs (loop0): stripes_read... done bcachefs (loop0): snapshots_read... done bcachefs (loop0): check_allocations... done bcachefs (loop0): going read-write bcachefs (loop0): done starting filesystem ============================================ WARNING: possible recursive locking detected 6.13.0-rc7-syzkaller-00209-g9528d418de4d #0 Not tainted -------------------------------------------- syz.0.0/5319 is trying to acquire lock: ffff8880442557c8 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] ffff8880442557c8 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: bch2_symlink+0x176/0x310 fs/bcachefs/fs.c:803 but task is already holding lock: ffff8880442548c8 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] ffff8880442548c8 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: ovl_copy_up_workdir fs/overlayfs/copy_up.c:782 [inline] ffff8880442548c8 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: ovl_do_copy_up fs/overlayfs/copy_up.c:1001 [inline] ffff8880442548c8 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: ovl_copy_up_one fs/overlayfs/copy_up.c:1202 [inline] ffff8880442548c8 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: ovl_copy_up_flags+0x1931/0x4720 fs/overlayfs/copy_up.c:1257 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&sb->s_type->i_mutex_key#22); lock(&sb->s_type->i_mutex_key#22); *** DEADLOCK *** May be due to missing lock nesting notation 6 locks held by syz.0.0/5319: #0: ffff888011eb8420 (sb_writers#14){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:516 #1: ffff88805458de50 (&ovl_i_mutex_dir_key[depth]/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:853 [inline] #1: ffff88805458de50 (&ovl_i_mutex_dir_key[depth]/1){+.+.}-{4:4}, at: lock_rename fs/namei.c:3215 [inline] #1: ffff88805458de50 (&ovl_i_mutex_dir_key[depth]/1){+.+.}-{4:4}, at: do_renameat2+0x62c/0x13f0 fs/namei.c:5159 #2: ffff88805458e418 (&ovl_i_mutex_key[depth]/4){+.+.}-{4:4}, at: vfs_rename+0x6a2/0xf00 fs/namei.c:5038 #3: ffff88805458e7d0 (&ovl_i_lock_key[depth]){+.+.}-{4:4}, at: ovl_inode_lock_interruptible fs/overlayfs/overlayfs.h:650 [inline] #3: ffff88805458e7d0 (&ovl_i_lock_key[depth]){+.+.}-{4:4}, at: ovl_copy_up_start+0x53/0x310 fs/overlayfs/util.c:727 #4: ffff888043926420 (sb_writers#13){.+.+}-{0:0}, at: ovl_copy_up_workdir fs/overlayfs/copy_up.c:781 [inline] #4: ffff888043926420 (sb_writers#13){.+.+}-{0:0}, at: ovl_do_copy_up fs/overlayfs/copy_up.c:1001 [inline] #4: ffff888043926420 (sb_writers#13){.+.+}-{0:0}, at: ovl_copy_up_one fs/overlayfs/copy_up.c:1202 [inline] #4: ffff888043926420 (sb_writers#13){.+.+}-{0:0}, at: ovl_copy_up_flags+0x191a/0x4720 fs/overlayfs/copy_up.c:1257 #5: ffff8880442548c8 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] #5: ffff8880442548c8 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: ovl_copy_up_workdir fs/overlayfs/copy_up.c:782 [inline] #5: ffff8880442548c8 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: ovl_do_copy_up fs/overlayfs/copy_up.c:1001 [inline] #5: ffff8880442548c8 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: ovl_copy_up_one fs/overlayfs/copy_up.c:1202 [inline] #5: ffff8880442548c8 (&sb->s_type->i_mutex_key#22){++++}-{4:4}, at: ovl_copy_up_flags+0x1931/0x4720 fs/overlayfs/copy_up.c:1257 stack backtrace: CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted 6.13.0-rc7-syzkaller-00209-g9528d418de4d #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:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 down_write+0x99/0x220 kernel/locking/rwsem.c:1577 inode_lock include/linux/fs.h:818 [inline] bch2_symlink+0x176/0x310 fs/bcachefs/fs.c:803 vfs_symlink+0x137/0x2e0 fs/namei.c:4669 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:783 [inline] ovl_do_copy_up fs/overlayfs/copy_up.c:1001 [inline] ovl_copy_up_one fs/overlayfs/copy_up.c:1202 [inline] ovl_copy_up_flags+0x196d/0x4720 fs/overlayfs/copy_up.c:1257 ovl_rename+0x62a/0x1750 fs/overlayfs/dir.c:1150 vfs_rename+0xbdb/0xf00 fs/namei.c:5067 do_renameat2+0xd94/0x13f0 fs/namei.c:5224 __do_sys_rename fs/namei.c:5271 [inline] __se_sys_rename fs/namei.c:5269 [inline] __x64_sys_rename+0x82/0x90 fs/namei.c:5269 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:0x7f0ae9185d29 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:00007f0ae9edd038 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f0ae9375fa0 RCX: 00007f0ae9185d29 RDX: 0000000000000000 RSI: 0000000020000f00 RDI: 0000000020000180 RBP: 00007f0ae9201b08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f0ae9375fa0 R15: 00007ffdaa3d0858 syz.0.0 (5319) used greatest stack depth: 15760 bytes left