Extracting prog: 46.128046316s Minimizing prog: 82.38µs Simplifying prog options: 0s Extracting C: 1m35.803428842s Simplifying C: 6m7.629201993s 1 programs, timeouts [30s 6m0s] extracting reproducer from 1 programs testing a last program of every proc single: executing 1 programs separately with timeout 30s testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_mount_image$bcachefs detailed listing: executing program 0: syz_mount_image$bcachefs(&(0x7f0000005b00), &(0x7f0000005b40)='./file2\x00', 0x0, &(0x7f0000000480)={[{@metadata_checksum={'metadata_checksum', 0x3d, 'none'}}, {@version_upgrade={'version_upgrade', 0x3d, 'incompatible'}}, {@reconstruct_alloc}, {@fix_errors={'fix_errors', 0x3d, 'exit'}}, {@version_upgrade={'version_upgrade', 0x3d, 'none'}}], [{@subj_type={'subj_type', 0x3d, '/(/{\x9cb\xc8\xff\x1a\xc0b\xf1\xe1[\xd7\x19\x9aXd8\xe0\xee\x1f0\xc9\x19\xc9\xe9*g\'\x99\x12\x8b\xfdm\x18\xe3\x92\xd7:\xa7-/\xffq\xcc\xfc\xcc\x85\v\xed\x1c\xc0L{\x1d\x1f\xfe\x99G!\x85\xea\xc0\x10\xd0\xc1\x0e%\x96\xed?\n\x88\x8d\x93\xfcM\xb1\xb2z_\xf4L\x14\xa7\x92?C\x1c)\xc1L{xr\x80\x1e\xe7\x80#\x17\xcf\xeb\xfc9v\x18\xafsG\xbf\x8b\xb6=8\xbe\x91H\x15\xcb\x89\x8e\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\xc9I\xd1~S-\xf3,\x9a,\xccO\xf9iR\a\x80E\xe2@#b\xf2\xf9\xf9\xa8\xf6\x13\xbb\xcf]\xae\xb8\xfa\xfb\x94\x9d\xd9^sb_lock){+.+.}-{3:3}, at: bch2_replicas_entry_validate+0x2a/0x80 fs/bcachefs/replicas.c:101 but task is already holding lock: ffff888073100908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 fs/bcachefs/sb-clean.c:149 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&c->sb_lock); lock(&c->sb_lock); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by syz-executor124/5212: #0: ffff888073100278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 fs/bcachefs/super.c:1007 #1: ffff888073100908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 fs/bcachefs/sb-clean.c:149 stack backtrace: CPU: 1 UID: 0 PID: 5212 Comm: syz-executor124 Not tainted 6.12.0-rc2-syzkaller-00100-geb952c47d154 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 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+0x1384/0x2050 kernel/locking/lockdep.c:5202 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 bch2_replicas_entry_validate+0x2a/0x80 fs/bcachefs/replicas.c:101 journal_entry_data_usage_validate+0x2b6/0x690 fs/bcachefs/journal_io.c:608 bch2_sb_clean_validate_late fs/bcachefs/sb-clean.c:40 [inline] bch2_read_superblock_clean+0x207/0x520 fs/bcachefs/sb-clean.c:168 bch2_fs_recovery+0x1f4/0x39c0 fs/bcachefs/recovery.c:639 bch2_fs_start+0x356/0x5b0 fs/bcachefs/super.c:1037 bch2_fs_get_tree+0xd68/0x1710 fs/bcachefs/fs.c:2078 vfs_get_tree+0x90/0x2b0 fs/super.c:1800 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4032 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:0x7fdef7906a7a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffdd2d29f78 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffdd2d29f90 RCX: 00007fdef7906a7a RDX: 0000000020005b00 RSI: 0000000020005b40 RDI: 00007ffdd2d29f90 RBP: 0000000000000004 R08: 00007ffdd2d29fd0 R09: 0000000000005b34 R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000 R13: 00007ffdd2d29fd0 R14: 0000000000000003 R15: 0000000001000000 final repro crashed as (corrupted=false): loop0: detected capacity change from 0 to 32768 bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,nojournal_transaction_names,reconstruct_alloc,version_upgrade=none ============================================ WARNING: possible recursive locking detected 6.12.0-rc2-syzkaller-00100-geb952c47d154 #0 Not tainted -------------------------------------------- syz-executor124/5212 is trying to acquire lock: ffff888073100908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_replicas_entry_validate+0x2a/0x80 fs/bcachefs/replicas.c:101 but task is already holding lock: ffff888073100908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 fs/bcachefs/sb-clean.c:149 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&c->sb_lock); lock(&c->sb_lock); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by syz-executor124/5212: #0: ffff888073100278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 fs/bcachefs/super.c:1007 #1: ffff888073100908 (&c->sb_lock){+.+.}-{3:3}, at: bch2_read_superblock_clean+0x36/0x520 fs/bcachefs/sb-clean.c:149 stack backtrace: CPU: 1 UID: 0 PID: 5212 Comm: syz-executor124 Not tainted 6.12.0-rc2-syzkaller-00100-geb952c47d154 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 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+0x1384/0x2050 kernel/locking/lockdep.c:5202 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 bch2_replicas_entry_validate+0x2a/0x80 fs/bcachefs/replicas.c:101 journal_entry_data_usage_validate+0x2b6/0x690 fs/bcachefs/journal_io.c:608 bch2_sb_clean_validate_late fs/bcachefs/sb-clean.c:40 [inline] bch2_read_superblock_clean+0x207/0x520 fs/bcachefs/sb-clean.c:168 bch2_fs_recovery+0x1f4/0x39c0 fs/bcachefs/recovery.c:639 bch2_fs_start+0x356/0x5b0 fs/bcachefs/super.c:1037 bch2_fs_get_tree+0xd68/0x1710 fs/bcachefs/fs.c:2078 vfs_get_tree+0x90/0x2b0 fs/super.c:1800 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4032 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:0x7fdef7906a7a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffdd2d29f78 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffdd2d29f90 RCX: 00007fdef7906a7a RDX: 0000000020005b00 RSI: 0000000020005b40 RDI: 00007ffdd2d29f90 RBP: 0000000000000004 R08: 00007ffdd2d29fd0 R09: 0000000000005b34 R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000 R13: 00007ffdd2d29fd0 R14: 0000000000000003 R15: 0000000001000000