INFO: task bch-reclaim/loo:14165 blocked for more than 143 seconds.
      Not tainted 6.16.0-syzkaller-11895-gcca7a0aae895 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:bch-reclaim/loo state:D stack:22696 pid:14165 tgid:14165 ppid:2      task_flags:0x200040 flags:0x00004000
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 schedule_preempt_disabled+0x13/0x30
 __mutex_lock+0x7e6/0x1360
 bch2_journal_reclaim_thread+0x16b/0x4f0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Showing all locks held in the system:
4 locks held by kworker/1:0H/25:
 #0: ffff88801f885948 ((wq_completion)bcachefs_btree_write_complete){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc900001d7bc0 ((work_completion)(&wb->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff888134b84398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0xaf/0x220
 #3: ffff888134ba6710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
1 lock held by khungtaskd/34:
 #0: ffffffff8e139ee0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180
2 locks held by getty/5668:
 #0: ffff8881054d10a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70
 #1: ffffc900029062f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x43e/0x1400
6 locks held by syz-executor/13487:
 #0: ffff8881094e80e0 (&type->s_umount_key#95){+.+.}-{4:4}, at: deactivate_super+0xa9/0xe0
 #1: ffff888134b80278 (&c->state_lock){++++}-{4:4}, at: __bch2_fs_stop+0xf8/0x900
 #2: ffff888134bcaf68 (&j->reclaim_lock){+.+.}-{4:4}, at: journal_flush_done+0x86/0x810
 #3: ffff888134b84398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
 #4: ffff888134b84740 (&wb->flushing.lock){+.+.}-{4:4}, at: btree_write_buffer_flush_seq+0x18bd/0x1a40
 #5: ffff888134ba6710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
1 lock held by bch-reclaim/loo/14165:
 #0: ffff888134bcaf68 (&j->reclaim_lock){+.+.}-{4:4}, at: bch2_journal_reclaim_thread+0x16b/0x4f0
3 locks held by udevd/15018:
2 locks held by syz.2.2231/15150:
 #0: ffff88812c9900e0 (&type->s_umount_key#56/1){+.+.}-{4:4}, at: alloc_super+0x204/0x970
 #1: ffffffff8dfe1668 (wq_pool_mutex){+.+.}-{4:4}, at: __alloc_workqueue+0x9eb/0x1b70

=============================================

NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 34 Comm: khungtaskd Not tainted 6.16.0-syzkaller-11895-gcca7a0aae895 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250
 nmi_cpu_backtrace+0x39e/0x3d0
 nmi_trigger_cpumask_backtrace+0x17a/0x300
 watchdog+0xf93/0xfe0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 15150 Comm: syz.2.2231 Not tainted 6.16.0-syzkaller-11895-gcca7a0aae895 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
RIP: 0010:io_serial_in+0x77/0xc0
Code: e8 8e 39 71 fc 44 89 f9 d3 e3 49 83 c6 40 4c 89 f0 48 c1 e8 03 42 80 3c 20 00 74 08 4c 89 f7 e8 0f a4 d4 fc 41 03 1e 89 da ec <0f> b6 c0 5b 41 5c 41 5e 41 5f e9 8a 09 2d 06 cc 44 89 f9 80 e1 07
RSP: 0018:ffffc90002f8f298 EFLAGS: 00000006
RAX: 1ffffffff33bcc05 RBX: 00000000000003f9 RCX: 0000000000000000
RDX: 00000000000003f9 RSI: 0000000000000000 RDI: 0000000000000020
RBP: ffffc90002f8f470 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: ffffffff854e71d0 R12: dffffc0000000000
R13: dffffc0000000000 R14: ffffffff99de64e0 R15: 0000000000000000
FS:  00007fa4fd3a96c0(0000) GS:ffff8880b8624000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055f3195e8000 CR3: 0000000125bf2000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 serial8250_console_write+0x584/0x1ba0
 console_flush_all+0x728/0xc40
 console_unlock+0xc4/0x270
 vprintk_emit+0x5b7/0x7a0
 _printk+0xcf/0x120
 xfs_printk_level+0x18b/0x280
 xfs_log_mount+0xb6/0x3e0
 xfs_mountfs+0xe5e/0x2330
 xfs_fs_fill_super+0x11b3/0x1600
 get_tree_bdev_flags+0x40e/0x4d0
 vfs_get_tree+0x92/0x2b0
 do_new_mount+0x2a2/0x9e0
 __se_sys_mount+0x317/0x410
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa4fc59038a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa4fd3a8e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fa4fd3a8ef0 RCX: 00007fa4fc59038a
RDX: 0000200000000700 RSI: 0000200000000280 RDI: 00007fa4fd3a8eb0
RBP: 0000200000000700 R08: 00007fa4fd3a8ef0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000000280
R13: 00007fa4fd3a8eb0 R14: 00000000000097b4 R15: 0000200000000200
 </TASK>
