INFO: task syz.7.204:7780 blocked for more than 143 seconds. Not tainted 6.13.0-rc1-syzkaller-00002-gcdd30ebb1b9f #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.7.204 state:D stack:22616 pid:7780 tgid:7728 ppid:6203 flags:0x00000004 Call Trace: <TASK> context_switch kernel/sched/core.c:5369 [inline] __schedule+0x17fb/0x4be0 kernel/sched/core.c:6756 __schedule_loop kernel/sched/core.c:6833 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6848 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6905 __mutex_lock_common kernel/locking/mutex.c:665 [inline] __mutex_lock+0x7e7/0xee0 kernel/locking/mutex.c:735 fdget_pos+0x254/0x320 fs/file.c:1191 class_fd_pos_constructor include/linux/file.h:85 [inline] ksys_write+0x7c/0x2b0 fs/read_write.c:722 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:0x7f970cb7ff19 RSP: 002b:00007f970d9d8058 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f970cd46080 RCX: 00007f970cb7ff19 RDX: 0000000000000028 RSI: 0000000020000040 RDI: 0000000000000006 RBP: 00007f970cbf3986 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f970cd46080 R15: 00007ffe3c206878 </TASK> INFO: task syz.7.204:7782 blocked for more than 143 seconds. Not tainted 6.13.0-rc1-syzkaller-00002-gcdd30ebb1b9f #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.7.204 state:D stack:25952 pid:7782 tgid:7728 ppid:6203 flags:0x00000004 Call Trace: <TASK> context_switch kernel/sched/core.c:5369 [inline] __schedule+0x17fb/0x4be0 kernel/sched/core.c:6756 __schedule_loop kernel/sched/core.c:6833 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6848 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6905 rwsem_down_write_slowpath+0xeee/0x13b0 kernel/locking/rwsem.c:1176 __down_write_common kernel/locking/rwsem.c:1304 [inline] __down_write kernel/locking/rwsem.c:1313 [inline] down_write+0x1d7/0x220 kernel/locking/rwsem.c:1578 inode_lock include/linux/fs.h:818 [inline] bch2_write_iter+0x134/0x2440 fs/bcachefs/fs-io-buffered.c:1040 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 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:0x7f970cb7ff19 RSP: 002b:00007f970d9b7058 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f970cd46160 RCX: 00007f970cb7ff19 RDX: 0000000000000028 RSI: 0000000020000040 RDI: 0000000000000006 RBP: 00007f970cbf3986 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f970cd46160 R15: 00007ffe3c206878 </TASK> Showing all locks held in the system: 1 lock held by pool_workqueue_/3: #0: ffffffff8e93cfb8 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock kernel/rcu/tree_exp.h:297 [inline] #0: ffffffff8e93cfb8 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x381/0x830 kernel/rcu/tree_exp.h:976 1 lock held by khungtaskd/30: #0: ffffffff8e937aa0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #0: ffffffff8e937aa0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #0: ffffffff8e937aa0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6744 2 locks held by getty/5576: #0: ffff88814ea100a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243 #1: ffffc9000330b2f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x6a6/0x1e00 drivers/tty/n_tty.c:2211 5 locks held by syz.7.204/7731: #0: ffff88823bed8420 (sb_writers#28){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:515 #1: ffff88805e6408c8 (&sb->s_type->i_mutex_key#41){++++}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] #1: ffff88805e6408c8 (&sb->s_type->i_mutex_key#41){++++}-{4:4}, at: do_truncate+0x20c/0x310 fs/open.c:63 #2: ffff888068600a38 (&c->snapshot_create_lock){.+.+}-{4:4}, at: bch2_truncate+0x166/0x2d0 fs/bcachefs/io_misc.c:292 #3: ffff888068604398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:158 [inline] #3: ffff888068604398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:249 [inline] #3: ffff888068604398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7e1/0xd30 fs/bcachefs/btree_iter.c:3228 #4: ffff8880686266d0 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x682/0x14e0 fs/bcachefs/btree_update_interior.c:1197 1 lock held by syz.7.204/7780: #0: ffff8880283c2638 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x254/0x320 fs/file.c:1191 3 locks held by syz.7.204/7782: #0: ffff8880283c2638 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x254/0x320 fs/file.c:1191 #1: ffff88823bed8420 (sb_writers#28){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2964 [inline] #1: ffff88823bed8420 (sb_writers#28){.+.+}-{0:0}, at: vfs_write+0x225/0xd30 fs/read_write.c:675 #2: ffff88805e6408c8 (&sb->s_type->i_mutex_key#41){++++}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] #2: ffff88805e6408c8 (&sb->s_type->i_mutex_key#41){++++}-{4:4}, at: bch2_write_iter+0x134/0x2440 fs/bcachefs/fs-io-buffered.c:1040 4 locks held by bch-reclaim/loo/7769: #0: ffff88806864b0a8 (&j->reclaim_lock){+.+.}-{4:4}, at: bch2_journal_reclaim_thread+0x167/0x560 fs/bcachefs/journal_reclaim.c:739 #1: ffff888068604398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:158 [inline] #1: ffff888068604398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:249 [inline] #1: ffff888068604398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7e1/0xd30 fs/bcachefs/btree_iter.c:3228 #2: ffff888068604740 (&wb->flushing.lock){+.+.}-{4:4}, at: btree_write_buffer_flush_seq+0x1b19/0x1cc0 fs/bcachefs/btree_write_buffer.c:516 #3: ffff8880686266d0 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x682/0x14e0 fs/bcachefs/btree_update_interior.c:1197 1 lock held by syz-executor/8359: #0: ffff8880577ee0e0 (&type->s_umount_key#57){++++}-{4:4}, at: __super_lock fs/super.c:56 [inline] #0: ffff8880577ee0e0 (&type->s_umount_key#57){++++}-{4:4}, at: __super_lock_excl fs/super.c:71 [inline] #0: ffff8880577ee0e0 (&type->s_umount_key#57){++++}-{4:4}, at: deactivate_super+0xb5/0xf0 fs/super.c:505 2 locks held by syz-executor/9681: #0: ffff88805b6580e0 (&type->s_umount_key#56){++++}-{4:4}, at: __super_lock fs/super.c:56 [inline] #0: ffff88805b6580e0 (&type->s_umount_key#56){++++}-{4:4}, at: __super_lock_excl fs/super.c:71 [inline] #0: ffff88805b6580e0 (&type->s_umount_key#56){++++}-{4:4}, at: deactivate_super+0xb5/0xf0 fs/super.c:505 #1: ffffffff8e93ce80 (rcu_state.barrier_mutex){+.+.}-{4:4}, at: rcu_barrier+0x4c/0x530 kernel/rcu/tree.c:4565 2 locks held by syz.4.435/10601: 1 lock held by syz.5.437/10608: #0: ffffffff8eeb6708 (uuid_mutex){+.+.}-{4:4}, at: btrfs_get_tree_super fs/btrfs/super.c:1841 [inline] #0: ffffffff8eeb6708 (uuid_mutex){+.+.}-{4:4}, at: btrfs_get_tree+0x2f4/0x1a10 fs/btrfs/super.c:2105 ============================================= NMI backtrace for cpu 1 CPU: 1 UID: 0 PID: 30 Comm: khungtaskd Not tainted 6.13.0-rc1-syzkaller-00002-gcdd30ebb1b9f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: <TASK> __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 nmi_cpu_backtrace+0x49c/0x4d0 lib/nmi_backtrace.c:113 nmi_trigger_cpumask_backtrace+0x198/0x320 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:162 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:234 [inline] watchdog+0xff6/0x1040 kernel/hung_task.c:397 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 </TASK> Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 UID: 0 PID: 16 Comm: ksoftirqd/0 Not tainted 6.13.0-rc1-syzkaller-00002-gcdd30ebb1b9f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:arch_atomic_try_cmpxchg arch/x86/include/asm/atomic.h:107 [inline] RIP: 0010:raw_atomic_try_cmpxchg_acquire include/linux/atomic/atomic-arch-fallback.h:2170 [inline] RIP: 0010:atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1302 [inline] RIP: 0010:queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] RIP: 0010:do_raw_spin_lock+0x2ed/0x370 kernel/locking/spinlock_debug.c:116 Code: 00 00 00 00 fc ff df e9 26 fe ff ff 44 89 f1 80 e1 07 80 c1 03 38 c1 0f 8c 4d fe ff ff 4c 89 f7 e8 28 17 8b 00 e9 40 fe ff ff <48> 8d 4c 24 60 80 e1 07 80 c1 03 38 c1 0f 8c 60 fe ff ff 48 8d 7c RSP: 0018:ffffc900001576e0 EFLAGS: 00000002 RAX: 0000000000000004 RBX: dffffc0000000000 RCX: ffffffff817c15cf RDX: dffffc0000000000 RSI: 0000000000000004 RDI: ffffc90000157740 RBP: ffffc900001577b0 R08: 0000000000000003 R09: fffff5200002aee8 R10: dffffc0000000000 R11: fffff5200002aee8 R12: ffffffff9a582420 R13: 1ffff9200002aee8 R14: ffffc90000157740 R15: 1ffffffff34b0485 FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005621f2757950 CR3: 0000000034a14000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <NMI> </NMI> <TASK> __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xe1/0x120 kernel/locking/spinlock.c:162 __debug_check_no_obj_freed lib/debugobjects.c:1088 [inline] debug_check_no_obj_freed+0x234/0x580 lib/debugobjects.c:1129 slab_free_hook mm/slub.c:2269 [inline] slab_free mm/slub.c:4598 [inline] kmem_cache_free+0x114/0x410 mm/slub.c:4700 rcu_do_batch kernel/rcu/tree.c:2567 [inline] rcu_core+0xaaa/0x17a0 kernel/rcu/tree.c:2823 handle_softirqs+0x2d4/0x9b0 kernel/softirq.c:554 run_ksoftirqd+0xca/0x130 kernel/softirq.c:943 smpboot_thread_fn+0x544/0xa30 kernel/smpboot.c:164 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 </TASK>