BUG: MAX_LOCK_DEPTH too low! turning off the locking correctness validator. depth: 48 max: 48! 48 locks held by syz.4.7191/5251: #0: ffff88804edd6420 (sb_writers#12){.+.+}-{0:0}, at: do_ftruncate+0x294/0x590 fs/open.c:178 #1: ffff8880622f6900 (&sb->s_type->i_mutex_key#25){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline] #1: ffff8880622f6900 (&sb->s_type->i_mutex_key#25){+.+.}-{3:3}, at: do_truncate fs/open.c:63 [inline] #1: ffff8880622f6900 (&sb->s_type->i_mutex_key#25){+.+.}-{3:3}, at: do_ftruncate+0x457/0x590 fs/open.c:181 #2: ffff888044d00ab8 (&c->snapshot_create_lock){.+.+}-{3:3}, at: bch2_truncate+0x16c/0x2c0 fs/bcachefs/io_misc.c:290 #3: ffff888044d042d8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:116 [inline] #3: ffff888044d042d8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:215 [inline] #3: ffff888044d042d8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0xb1/0x220 fs/bcachefs/btree_iter.c:3021 #4: ffff8880597b2070 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #4: ffff8880597b2070 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #4: ffff8880597b2070 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #4: ffff8880597b2070 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa44/0x2930 fs/bcachefs/btree_iter.c:1177 #5: ffff8880597b2070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment+0x2f2/0x320 fs/bcachefs/btree_locking.h:248 #6: ffff8880597b2070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment+0x2f2/0x320 fs/bcachefs/btree_locking.h:248 #7: ffff8880597b2070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment+0x2f2/0x320 fs/bcachefs/btree_locking.h:248 #8: ffff8880597b2070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment+0x2f2/0x320 fs/bcachefs/btree_locking.h:248 #9: ffff8880597b2070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment+0x2f2/0x320 fs/bcachefs/btree_locking.h:248 #10: ffff8880597b2070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment+0x2f2/0x320 fs/bcachefs/btree_locking.h:248 #11: ffff8880597b2070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment+0x2f2/0x320 fs/bcachefs/btree_locking.h:248 #12: ffff8880597b2070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment+0x2f2/0x320 fs/bcachefs/btree_locking.h:248 #13: ffff8880622b39f8 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #13: ffff8880622b39f8 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #14: ffff8880622b25d0 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #14: ffff8880622b25d0 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #15: ffff8880622b2f38 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #15: ffff8880622b2f38 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #16: ffff8880622b3498 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #16: ffff8880622b3498 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #17: ffff8880622b31e8 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #17: ffff8880622b31e8 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #18: ffff8880622b2b30 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #18: ffff8880622b2b30 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #19: ffff8880622b2c88 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #19: ffff8880622b2c88 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #20: ffff8880622b3340 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #20: ffff8880622b3340 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #21: ffff88802a8cd070 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #21: ffff88802a8cd070 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #21: ffff88802a8cd070 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #21: ffff88802a8cd070 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa44/0x2930 fs/bcachefs/btree_iter.c:1177 #22: ffff8880705c3070 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #22: ffff8880705c3070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #23: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #23: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #23: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #23: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa44/0x2930 fs/bcachefs/btree_iter.c:1177 #24: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #24: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #24: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #24: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa44/0x2930 fs/bcachefs/btree_iter.c:1177 #25: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #25: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #25: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #25: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa44/0x2930 fs/bcachefs/btree_iter.c:1177 #26: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #26: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #26: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #26: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa44/0x2930 fs/bcachefs/btree_iter.c:1177 #27: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #27: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #27: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #27: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xa44/0x2930 fs/bcachefs/btree_iter.c:1177 #28: ffff88801f08a870 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #28: ffff88801f08a870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #29: ffff88801f08a870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #29: ffff88801f08a870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #30: ffff88801f08a870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #30: ffff88801f08a870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #31: ffff88801f08a870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #31: ffff88801f08a870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #32: ffff88801f08a870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #32: ffff88801f08a870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #33: ffff88801f08a870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #33: ffff88801f08a870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x675/0x9c0 fs/bcachefs/btree_locking.c:509 #34: ffff88806dc88870 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #34: ffff88806dc88870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x142/0x9c0 fs/bcachefs/btree_locking.c:507 #35: ffff888044d26750 (&c->gc_lock){.+.+}-{3:3}, at: bch2_btree_update_start+0x68d/0x1500 fs/bcachefs/btree_update_interior.c:1195 #36: ffff8880459d79f8 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_cached+0x48d/0xd50 #37: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_path_copy fs/bcachefs/btree_iter.c:1228 [inline] #37: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_path_clone fs/bcachefs/btree_iter.c:1236 [inline] #37: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_path_make_mut+0x1ec/0x570 fs/bcachefs/btree_iter.c:1249 #38: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_path_copy fs/bcachefs/btree_iter.c:1228 [inline] #38: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_path_clone fs/bcachefs/btree_iter.c:1236 [inline] #38: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_path_make_mut+0x1ec/0x570 fs/bcachefs/btree_iter.c:1249 #39: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_path_copy fs/bcachefs/btree_iter.c:1228 [inline] #39: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: btree_path_clone fs/bcachefs/btree_iter.c:1236 [inline] #39: ffff8880705c6870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_path_make_mut+0x1ec/0x570 fs/bcachefs/btree_iter.c:1249 #40: ffff88807ab90880 (&dev->mutex){....}-{3:3}, at: six_trylock_intent fs/bcachefs/six.h:366 [inline] #40: ffff88807ab90880 (&dev->mutex){....}-{3:3}, at: bkey_cached_alloc fs/bcachefs/btree_key_cache.c:290 [inline] #40: ffff88807ab90880 (&dev->mutex){....}-{3:3}, at: btree_key_cache_create fs/bcachefs/btree_key_cache.c:330 [inline] #40: ffff88807ab90880 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_cached_slowpath+0x1559/0x48c0 fs/bcachefs/btree_key_cache.c:485 #41: ffff88801f08b070 (&dev->mutex){....}-{3:3}, at: btree_node_lock_nopath_nofail fs/bcachefs/btree_locking.h:228 [inline] #41: ffff88801f08b070 (&dev->mutex){....}-{3:3}, at: bch2_btree_node_alloc+0x114/0xe80 fs/bcachefs/btree_update_interior.c:392 #42: ffff88801f08b070 (&dev->mutex){....}-{3:3}, at: btree_split+0x1b88/0x6980 fs/bcachefs/btree_update_interior.c:1674 #43: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #43: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #43: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: __queue_work+0x198/0xee0 kernel/workqueue.c:2284 #44: ffff8880b943e338 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x6e5/0xee0 #45: ffff888027082818 (&p->pi_lock){-.-.}-{2:2}, at: class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:553 [inline] #45: ffff888027082818 (&p->pi_lock){-.-.}-{2:2}, at: try_to_wake_up+0xb0/0x1470 kernel/sched/core.c:4262 #46: ffff8880b943e798 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 #47: ffffe8ffffc72388 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: update_rq_clock_task kernel/sched/core.c:726 [inline] #47: ffffe8ffffc72388 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: update_rq_clock+0x22b/0x8a0 kernel/sched/core.c:770 INFO: lockdep is turned off. CPU: 0 PID: 5251 Comm: syz.4.7191 Not tainted 6.10.0-rc6-syzkaller-00163-g661e504db04c #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:5754 do_write_seqcount_begin_nested include/linux/seqlock.h:469 [inline] do_write_seqcount_begin include/linux/seqlock.h:495 [inline] psi_account_irqtime+0x1b2/0x5d0 kernel/sched/psi.c:1016 update_rq_clock_task kernel/sched/core.c:726 [inline] update_rq_clock+0x22b/0x8a0 kernel/sched/core.c:770 ttwu_queue kernel/sched/core.c:4056 [inline] try_to_wake_up+0x86b/0x1470 kernel/sched/core.c:4378 kick_pool+0x45c/0x620 kernel/workqueue.c:1280 __queue_work+0xc22/0xee0 kernel/workqueue.c:2361 queue_work_on+0x1c2/0x380 kernel/workqueue.c:2411 queue_work include/linux/workqueue.h:621 [inline] __bch2_btree_node_write+0x37c8/0x46b0 fs/bcachefs/btree_io.c:2232 bch2_btree_node_write+0x63/0x1f0 fs/bcachefs/btree_io.c:2307 btree_split+0x51ba/0x6980 fs/bcachefs/btree_update_interior.c:1706 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+0x715/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+0xb9f/0xe70 fs/attr.c:497 do_truncate fs/open.c:65 [inline] do_ftruncate+0x46b/0x590 fs/open.c:181 do_sys_ftruncate fs/open.c:199 [inline] __do_sys_ftruncate fs/open.c:207 [inline] __se_sys_ftruncate fs/open.c:205 [inline] __x64_sys_ftruncate+0x95/0xf0 fs/open.c:205 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:0x7f88df775bd9 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:00007f88e0532048 EFLAGS: 00000246 ORIG_RAX: 000000000000004d RAX: ffffffffffffffda RBX: 00007f88df903f60 RCX: 00007f88df775bd9 RDX: 0000000000000000 RSI: 000000000000ee72 RDI: 0000000000000005 RBP: 00007f88df7e4aa1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f88df903f60 R15: 00007ffe0de5e5b8