BUG: MAX_LOCK_DEPTH too low! turning off the locking correctness validator. depth: 48 max: 48! 48 locks held by syz.3.693/12194: #0: ffff888059206420 (sb_writers#25){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:515 #1: ffff8880771f88a8 (&sb->s_type->i_mutex_key#35){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:799 [inline] #1: ffff8880771f88a8 (&sb->s_type->i_mutex_key#35){+.+.}-{3:3}, at: do_truncate+0x20c/0x310 fs/open.c:63 #2: ffff888059e00ab8 (&c->snapshot_create_lock){.+.+}-{3:3}, at: bch2_truncate+0x16c/0x2c0 fs/bcachefs/io_misc.c:290 #3: ffff888059e042d8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:151 [inline] #3: ffff888059e042d8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:250 [inline] #3: ffff888059e042d8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0xb1/0x220 fs/bcachefs/btree_iter.c:3021 #4: ffff888067984070 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #4: ffff888067984070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #5: ffff888067984070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #5: ffff888067984070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #6: ffff888067984070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #6: ffff888067984070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #7: ffff888067984070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #7: ffff888067984070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #8: ffff888067984070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #8: ffff888067984070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #9: ffff888067984070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #9: ffff888067984070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #10: ffff888067984070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #10: ffff888067984070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #11: ffff888067984070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #11: ffff888067984070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #12: ffff888067984070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #12: ffff888067984070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #13: ffff888063822728 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #13: ffff888063822728 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #14: ffff888077183ca8 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #14: ffff888077183ca8 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #15: ffff888077183498 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #15: ffff888077183498 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #16: ffff888077183e00 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #16: ffff888077183e00 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #17: ffff888077183090 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #17: ffff888077183090 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #18: ffff8880771831e8 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #18: ffff8880771831e8 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #19: ffff8880771825d0 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #19: ffff8880771825d0 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #20: ffff8880771829d8 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #20: ffff8880771829d8 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #21: ffff88807b219870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #21: ffff88807b219870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:288 [inline] #21: ffff88807b219870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #21: ffff88807b219870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa44/0x2930 fs/bcachefs/btree_iter.c:1177 #22: ffff88807b219070 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #22: ffff88807b219070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #23: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #23: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:288 [inline] #23: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #23: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa44/0x2930 fs/bcachefs/btree_iter.c:1177 #24: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #24: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:288 [inline] #24: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #24: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa44/0x2930 fs/bcachefs/btree_iter.c:1177 #25: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #25: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:288 [inline] #25: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #25: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa44/0x2930 fs/bcachefs/btree_iter.c:1177 #26: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #26: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:288 [inline] #26: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #26: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa44/0x2930 fs/bcachefs/btree_iter.c:1177 #27: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #27: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:288 [inline] #27: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #27: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa44/0x2930 fs/bcachefs/btree_iter.c:1177 #28: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #28: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #29: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #29: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #30: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #30: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #31: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #31: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #32: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #32: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #33: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #33: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #34: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:270 [inline] #34: ffff888011a96070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #35: ffff88807c2d2870 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #35: ffff88807c2d2870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #36: ffff888059e26750 (&c->gc_lock){.+.+}-{3:3}, at: bch2_btree_update_start+0x68d/0x1500 fs/bcachefs/btree_update_interior.c:1195 #37: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_path_copy fs/bcachefs/btree_iter.c:1228 [inline] #37: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_path_clone fs/bcachefs/btree_iter.c:1236 [inline] #37: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_path_make_mut+0x1ec/0x570 fs/bcachefs/btree_iter.c:1249 #38: ffff8880772db5f0 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_cached+0x48d/0xd50 #39: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_path_copy fs/bcachefs/btree_iter.c:1228 [inline] #39: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_path_clone fs/bcachefs/btree_iter.c:1236 [inline] #39: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_path_make_mut+0x1ec/0x570 fs/bcachefs/btree_iter.c:1249 #40: ffff888077182880 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_cached+0x48d/0xd50 #41: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_path_copy fs/bcachefs/btree_iter.c:1228 [inline] #41: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: btree_path_clone fs/bcachefs/btree_iter.c:1236 [inline] #41: ffff88807b21b070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_path_make_mut+0x1ec/0x570 fs/bcachefs/btree_iter.c:1249 #42: ffff8880772dbca8 (&dev->mutex){....}-{3:3}, at: six_trylock_intent fs/bcachefs/six.h:366 [inline] #42: ffff8880772dbca8 (&dev->mutex){....}-{3:3}, at: bkey_cached_alloc fs/bcachefs/btree_key_cache.c:290 [inline] #42: ffff8880772dbca8 (&dev->mutex){....}-{3:3}, at: btree_key_cache_create fs/bcachefs/btree_key_cache.c:330 [inline] #42: ffff8880772dbca8 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_cached_slowpath+0x1559/0x48c0 fs/bcachefs/btree_key_cache.c:485 #43: ffff88807c2d7870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_nopath_nofail fs/bcachefs/btree_locking.h:250 [inline] #43: ffff88807c2d7870 (&dev->mutex){....}-{3:3}, at: bch2_btree_node_alloc+0x114/0xe80 fs/bcachefs/btree_update_interior.c:392 #44: ffff888059e04b48 (&clock->timer_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #44: ffff888059e04b48 (&clock->timer_lock){+.+.}-{2:2}, at: __bch2_increment_clock+0x4d/0x590 fs/bcachefs/clock.c:146 #45: ffff8880210e6418 (&p->pi_lock){-.-.}-{2:2}, at: class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:551 [inline] #45: ffff8880210e6418 (&p->pi_lock){-.-.}-{2:2}, at: try_to_wake_up+0xb0/0x1470 kernel/sched/core.c:4051 #46: ffff8880b953e718 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:560 #47: ffff8880b9528948 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_change+0xfd/0x280 kernel/sched/psi.c:913 INFO: lockdep is turned off. CPU: 1 PID: 12194 Comm: syz.3.693 Not tainted 6.10.0-syzkaller-02711-g0434dbe32053 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 __lock_acquire+0x10c3/0x1fd0 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 do_write_seqcount_begin_nested include/linux/seqlock.h:469 [inline] do_write_seqcount_begin include/linux/seqlock.h:495 [inline] psi_group_change+0x1c3/0x11c0 kernel/sched/psi.c:791 psi_task_change+0xfd/0x280 kernel/sched/psi.c:913 psi_enqueue kernel/sched/stats.h:143 [inline] enqueue_task+0x2aa/0x300 kernel/sched/core.c:1975 activate_task kernel/sched/core.c:2009 [inline] ttwu_do_activate+0x1d1/0x7e0 kernel/sched/core.c:3582 ttwu_queue kernel/sched/core.c:3846 [inline] try_to_wake_up+0x884/0x1470 kernel/sched/core.c:4167 __bch2_increment_clock+0x529/0x590 fs/bcachefs/clock.c:148 bch2_increment_clock fs/bcachefs/clock.h:19 [inline] bch2_btree_node_alloc+0x9fe/0xe80 fs/bcachefs/btree_update_interior.c:427 bch2_btree_node_alloc_replacement+0xe8/0xc40 fs/bcachefs/btree_update_interior.c:448 btree_split+0x1a14/0x6980 fs/bcachefs/btree_update_interior.c:1662 bch2_btree_split_leaf+0x158/0x810 fs/bcachefs/btree_update_interior.c:1857 bch2_trans_commit_error+0x200/0x1210 fs/bcachefs/btree_trans_commit.c:918 __bch2_trans_commit+0x6e6c/0x88e0 fs/bcachefs/btree_trans_commit.c:1138 bch2_trans_commit fs/bcachefs/btree_update.h:170 [inline] bch2_extent_update+0x4c0/0xbb0 fs/bcachefs/io_write.c:326 bch2_fpunch_at+0x87c/0x1020 fs/bcachefs/io_misc.c:184 __bch2_resume_logged_op_truncate+0x716/0xaa0 fs/bcachefs/io_misc.c:260 bch2_truncate+0x1cf/0x2c0 fs/bcachefs/io_misc.c:291 bchfs_truncate+0x80f/0xc80 fs/bcachefs/fs-io.c:476 notify_change+0xb9d/0xe70 fs/attr.c:495 do_truncate+0x220/0x310 fs/open.c:65 handle_truncate fs/namei.c:3381 [inline] do_open fs/namei.c:3731 [inline] path_openat+0x2ced/0x3470 fs/namei.c:3886 do_filp_open+0x235/0x490 fs/namei.c:3913 do_sys_openat2+0x13e/0x1d0 fs/open.c:1416 do_sys_open fs/open.c:1431 [inline] __do_sys_open fs/open.c:1439 [inline] __se_sys_open fs/open.c:1435 [inline] __x64_sys_open+0x225/0x270 fs/open.c:1435 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:0x7f7aec375a19 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:00007f7aed0df048 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f7aec504038 RCX: 00007f7aec375a19 RDX: 0000000000000000 RSI: 000000000014927e RDI: 0000000020000180 RBP: 00007f7aec3e4e49 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f7aec504038 R15: 00007ffcbd6a71f8 syz.3.693 (12194) used greatest stack depth: 12176 bytes left