INFO: task bch-reclaim/loo:8207 blocked for more than 143 seconds.
      Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094-dirty #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:bch-reclaim/loo state:D stack:22696 pid:8207  tgid:8207  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:
1 lock held by khungtaskd/34:
 #0: ffffffff8e139ee0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180
5 locks held by kworker/u9:2/53:
 #0: ffff888136639f98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140
 #1: ffff88804b024008 (psi_seq){-.-.}-{0:0}, at: psi_task_switch+0x53/0x880
 #2: ffff88804b025918 (&base->lock){-.-.}-{2:2}, at: __mod_timer+0x1ae/0xf30
 #3: ffffffff99d44eb8 (&obj_hash[i].lock){-.-.}-{2:2}, at: debug_object_activate+0xbb/0x420
 #4: ffffffff8e139ee0 (rcu_read_lock){....}-{1:3}, at: unwind_next_frame+0xa5/0x2390
2 locks held by getty/5673:
 #0: ffff88802582d0a0 (&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 kworker/1:6/6008:
 #0: ffff888104c2a148 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc90003adfbc0 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff888023372198 (&dev->mutex){....}-{4:4}, at: hub_event+0x184/0x4a20
 #3: ffff88806051f198 (&dev->mutex){....}-{4:4}, at: __device_attach+0x88/0x400
 #4: ffff88810f849160 (&dev->mutex){....}-{4:4}, at: __device_attach+0x88/0x400
 #5: ffffffff8f48cca8 (register_mutex#6){+.+.}-{4:4}, at: usb_audio_probe+0x390/0x1e10
4 locks held by kworker/0:2H/6428:
 #0: ffff8880344fb948 ((wq_completion)bcachefs_btree_write_complete){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc90006477bc0 ((work_completion)(&wb->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff888127004398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0xaf/0x220
 #3: ffff888127026710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
6 locks held by syz-executor/6997:
 #0: ffff888033cb80e0 (&type->s_umount_key#74){++++}-{4:4}, at: deactivate_super+0xa9/0xe0
 #1: ffff888127000278 (&c->state_lock){++++}-{4:4}, at: __bch2_fs_stop+0xf8/0x900
 #2: ffff88812704af68 (&j->reclaim_lock){+.+.}-{4:4}, at: journal_flush_done+0x86/0x810
 #3: ffff888127004398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
 #4: ffff888127004740 (&wb->flushing.lock){+.+.}-{4:4}, at: btree_write_buffer_flush_seq+0x18bd/0x1a40
 #5: ffff888127026710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
2 locks held by kworker/u10:5/7919:
 #0: ffff88801f064148 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9000292fbc0 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
1 lock held by bch-reclaim/loo/8207:
 #0: ffff88812704af68 (&j->reclaim_lock){+.+.}-{4:4}, at: bch2_journal_reclaim_thread+0x16b/0x4f0
4 locks held by kworker/1:2H/8230:
 #0: ffff8880344fb948 ((wq_completion)bcachefs_btree_write_complete){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc900039cfbc0 ((work_completion)(&wb->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff888127004398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0xaf/0x220
 #3: ffff888127026710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
6 locks held by syz-executor/8457:
 #0: ffff8881086ee0e0 (&type->s_umount_key#74){++++}-{4:4}, at: deactivate_super+0xa9/0xe0
 #1: ffff888135000278 (&c->state_lock){++++}-{4:4}, at: __bch2_fs_stop+0xf8/0x900
 #2: ffff88813504af68 (&j->reclaim_lock){+.+.}-{4:4}, at: journal_flush_done+0x86/0x810
 #3: ffff888135004398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
 #4: ffff888135004398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_btree_key_cache_journal_flush+0x105/0xd30
 #5: ffff888135026710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
1 lock held by bch-reclaim/loo/8738:
 #0: ffff88813504af68 (&j->reclaim_lock){+.+.}-{4:4}, at: bch2_journal_reclaim_thread+0x16b/0x4f0
1 lock held by udevd/9003:
1 lock held by syz.1.988/9848:
 #0: ffff888033cb80e0 (&type->s_umount_key#74){++++}-{4:4}, at: super_lock+0x2a9/0x3b0

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

NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 34 Comm: khungtaskd Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094-dirty #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 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 5912 Comm: kworker/u8:4 Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094-dirty #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: bat_events batadv_nc_worker
RIP: 0010:lock_release+0x20/0x3e0
Code: 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 55 41 57 41 56 41 55 41 54 53 48 83 ec 30 49 89 f5 49 89 fe 65 48 8b 05 10 d4 02 11 <48> 89 44 24 28 0f 1f 44 00 00 65 8b 05 13 d4 02 11 83 f8 08 0f 83
RSP: 0018:ffffc9000389f9b8 EFLAGS: 00000286
RAX: 4394af1fc605ca00 RBX: ffff88810c1a6f80 RCX: ffff888109883980
RDX: 0000000000000000 RSI: ffffffff8b46ce62 RDI: ffffffff8e139ee0
RBP: fffffffffffffe38 R08: 0000000000000000 R09: ffffffff8b46ce62
R10: dffffc0000000000 R11: ffffffff8b46cd90 R12: dffffc0000000000
R13: ffffffff8b46ce62 R14: ffffffff8e139ee0 R15: 0000000000000111
FS:  0000000000000000(0000) GS:ffff8881a3c1c000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff8c85fcd8 CR3: 000000010e402000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 batadv_nc_worker+0x28c/0x610
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>
