BUG: MAX_LOCK_DEPTH too low! turning off the locking correctness validator. depth: 48 max: 48! 48 locks held by syz-executor.1/7637: #0: ffff888044e66420 (sb_writers#22){.+.+}-{0:0}, at: do_open fs/namei.c:3643 [inline] #0: ffff888044e66420 (sb_writers#22){.+.+}-{0:0}, at: path_openat+0x1ff9/0x29f0 fs/namei.c:3807 #1: ffff888034144b60 ( &sb->s_type->i_mutex_key#29){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline] &sb->s_type->i_mutex_key#29){+.+.}-{3:3}, at: do_truncate+0x14b/0x220 fs/open.c:63 #2: ffff888049c00ab8 (&c->snapshot_create_lock){.+.+}-{3:3}, at: bch2_truncate+0x128/0x220 fs/bcachefs/io_misc.c:290 #3: ffff888049c042d8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:116 [inline] (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:215 [inline] (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock fs/bcachefs/btree_iter.c:3021 [inline] (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_btree_path_traverse_one+0x255d/0x2dd0 fs/bcachefs/btree_iter.c:1141 #4: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #4: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x121/0xa40 fs/bcachefs/btree_locking.c:507 #5: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #5: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #6: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #6: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #7: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #7: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #8: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #8: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #9: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #9: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #10: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #10: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #11: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #11: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #12: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #12: ffff88802ad66870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #13: ffff888032499748 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #13: ffff888032499748 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x121/0xa40 fs/bcachefs/btree_locking.c:507 #14: ffff888032499498 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #14: ffff888032499498 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x121/0xa40 fs/bcachefs/btree_locking.c:507 #15: ffff888032499340 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #15: ffff888032499340 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x121/0xa40 fs/bcachefs/btree_locking.c:507 #16: ffff888032499e00 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #16: ffff888032499e00 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x121/0xa40 fs/bcachefs/btree_locking.c:507 #17: ffff8880324998a0 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #17: ffff8880324998a0 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x121/0xa40 fs/bcachefs/btree_locking.c:507 #18: ffff888032499ca8 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #18: ffff888032499ca8 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x121/0xa40 fs/bcachefs/btree_locking.c:507 #19: ffff8880324995f0 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #19: ffff8880324995f0 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x121/0xa40 fs/bcachefs/btree_locking.c:507 #20: ffff888032499090 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #20: ffff888032499090 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x121/0xa40 fs/bcachefs/btree_locking.c:507 #21: ffff888029a42870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #21: ffff888029a42870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #21: ffff888029a42870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #21: ffff888029a42870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xc3c/0x2dd0 fs/bcachefs/btree_iter.c:1177 #22: ffff888029a47070 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #22: ffff888029a47070 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x121/0xa40 fs/bcachefs/btree_locking.c:507 #23: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #23: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #23: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #23: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xc3c/0x2dd0 fs/bcachefs/btree_iter.c:1177 #24: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #24: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #24: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #24: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xc3c/0x2dd0 fs/bcachefs/btree_iter.c:1177 #25: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #25: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #25: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #25: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xc3c/0x2dd0 fs/bcachefs/btree_iter.c:1177 #26: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #26: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #26: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #26: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xc3c/0x2dd0 fs/bcachefs/btree_iter.c:1177 #27: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #27: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #27: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #27: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xc3c/0x2dd0 fs/bcachefs/btree_iter.c:1177 #28: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: six_trylock_type fs/bcachefs/six.h:207 [inline] #28: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_node_lock fs/bcachefs/btree_locking.h:266 [inline] #28: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_path_lock_root fs/bcachefs/btree_iter.c:757 [inline] #28: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_one+0xc3c/0x2dd0 fs/bcachefs/btree_iter.c:1177 #29: ffff888023985870 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #29: ffff888023985870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x121/0xa40 fs/bcachefs/btree_locking.c:507 #30: ffff888023985870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #30: ffff888023985870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #31: ffff888023985870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #31: ffff888023985870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #32: ffff888023985870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #32: ffff888023985870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #33: ffff888023985870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #33: ffff888023985870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #34: ffff888023985870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #34: ffff888023985870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #35: ffff888023985870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_increment fs/bcachefs/btree_locking.h:248 [inline] #35: ffff888023985870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x6e0/0xa40 fs/bcachefs/btree_locking.c:509 #36: ffff88801b418870 (&dev->mutex){....}-{3:3}, at: six_relock_type fs/bcachefs/six.h:289 [inline] #36: ffff88801b418870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_node_relock+0x121/0xa40 fs/bcachefs/btree_locking.c:507 #37: ffff888049c268d0 (&c->gc_lock){.+.+}-{3:3}, at: bch2_btree_update_start+0x821/0x1f50 fs/bcachefs/btree_update_interior.c:1195 #38: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_path_copy fs/bcachefs/btree_iter.c:1228 [inline] #38: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_path_clone fs/bcachefs/btree_iter.c:1236 [inline] #38: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_path_make_mut+0xbca/0x1000 fs/bcachefs/btree_iter.c:1249 #39: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_path_copy fs/bcachefs/btree_iter.c:1228 [inline] #39: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_path_clone fs/bcachefs/btree_iter.c:1236 [inline] #39: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_path_make_mut+0xbca/0x1000 fs/bcachefs/btree_iter.c:1249 #40: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_path_copy fs/bcachefs/btree_iter.c:1228 [inline] #40: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: btree_path_clone fs/bcachefs/btree_iter.c:1236 [inline] #40: ffff88802707c870 (&dev->mutex){....}-{3:3}, at: __bch2_btree_path_make_mut+0xbca/0x1000 fs/bcachefs/btree_iter.c:1249 #41: ffff888032646c88 (&dev->mutex){....}-{3:3}, at: six_trylock_intent fs/bcachefs/six.h:366 [inline] #41: ffff888032646c88 (&dev->mutex){....}-{3:3}, at: bkey_cached_alloc fs/bcachefs/btree_key_cache.c:290 [inline] #41: ffff888032646c88 (&dev->mutex){....}-{3:3}, at: btree_key_cache_create fs/bcachefs/btree_key_cache.c:330 [inline] #41: ffff888032646c88 (&dev->mutex){....}-{3:3}, at: bch2_btree_path_traverse_cached_slowpath+0x20ff/0x4d90 fs/bcachefs/btree_key_cache.c:485 #42: ffff88801b41b870 (&dev->mutex){....}-{3:3}, at: btree_node_lock_nopath_nofail fs/bcachefs/btree_locking.h:228 [inline] #42: ffff88801b41b870 (&dev->mutex){....}-{3:3}, at: bch2_btree_node_alloc+0x198/0xf40 fs/bcachefs/btree_update_interior.c:392 #43: ffff88801b41b870 (&dev->mutex){....}-{3:3}, at: btree_split+0x1605/0x3010 fs/bcachefs/btree_update_interior.c:1674 #44: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #44: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #44: ffffffff8dbb1920 (rcu_read_lock){....}-{1:2}, at: __queue_work+0xf2/0x1020 kernel/workqueue.c:2283 #45: ffff88806b13df78 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x39e/0x1020 kernel/workqueue.c:2319 #46: ffff888026368a18 (&p->pi_lock){-.-.}-{2:2}, at: class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:553 [inline] #46: ffff888026368a18 (&p->pi_lock){-.-.}-{2:2}, at: try_to_wake_up+0x9a/0x13e0 kernel/sched/core.c:4262 #47: ffff88806b13ec18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x29/0x130 kernel/sched/core.c:559 INFO: lockdep is turned off. CPU: 1 PID: 7637 Comm: syz-executor.1 Not tainted 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 __lock_acquire+0x207c/0x3b30 kernel/locking/lockdep.c:5159 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x29/0x130 kernel/sched/core.c:559 raw_spin_rq_lock kernel/sched/sched.h:1406 [inline] rq_lock kernel/sched/sched.h:1702 [inline] ttwu_queue kernel/sched/core.c:4055 [inline] try_to_wake_up+0x514/0x13e0 kernel/sched/core.c:4378 kick_pool+0x2a0/0x7a0 kernel/workqueue.c:1279 __queue_work+0x94d/0x1020 kernel/workqueue.c:2360 queue_work_on+0x11a/0x140 kernel/workqueue.c:2410 queue_work include/linux/workqueue.h:621 [inline] __bch2_btree_node_write+0x1fc1/0x2d60 fs/bcachefs/btree_io.c:2232 bch2_btree_node_write+0x127/0x2f0 fs/bcachefs/btree_io.c:2307 btree_split+0x1087/0x3010 fs/bcachefs/btree_update_interior.c:1706 bch2_btree_split_leaf+0x108/0x770 fs/bcachefs/btree_update_interior.c:1857 bch2_trans_commit_error+0x327/0xd00 fs/bcachefs/btree_trans_commit.c:918 __bch2_trans_commit+0x4eb1/0x7ad0 fs/bcachefs/btree_trans_commit.c:1138 bch2_trans_commit fs/bcachefs/btree_update.h:170 [inline] bch2_extent_update+0x494/0xa40 fs/bcachefs/io_write.c:326 bch2_fpunch_at+0x7e6/0xbc0 fs/bcachefs/io_misc.c:184 __bch2_resume_logged_op_truncate+0x4ce/0x7a0 fs/bcachefs/io_misc.c:260 bch2_truncate+0x1e1/0x220 fs/bcachefs/io_misc.c:291 bchfs_truncate+0x90c/0xd70 fs/bcachefs/fs-io.c:476 bch2_setattr+0x1ab/0x250 fs/bcachefs/fs.c:918 notify_change+0x742/0x11f0 fs/attr.c:497 do_truncate+0x15c/0x220 fs/open.c:65 handle_truncate fs/namei.c:3308 [inline] do_open fs/namei.c:3654 [inline] path_openat+0x2505/0x29f0 fs/namei.c:3807 do_filp_open+0x1dc/0x430 fs/namei.c:3834 do_sys_openat2+0x17a/0x1e0 fs/open.c:1405 do_sys_open fs/open.c:1420 [inline] __do_sys_open fs/open.c:1428 [inline] __se_sys_open fs/open.c:1424 [inline] __x64_sys_open+0x154/0x1e0 fs/open.c:1424 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb06927cee9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb069f200c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007fb0693abf80 RCX: 00007fb06927cee9 RDX: 0000000000000000 RSI: 000000000004c37e RDI: 0000000020000000 RBP: 00007fb0692c949e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fb0693abf80 R15: 00007ffcdb8d6038 syz-executor.1 (7637) used greatest stack depth: 16568 bytes left