INFO: task bch-reclaim/loo:11900 blocked for more than 143 seconds.
      Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:bch-reclaim/loo state:D stack:22696 pid:11900 tgid:11900 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:
3 locks held by kworker/1:0/24:
 #0: ffff88801a480d48 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc900001c7bc0 ((work_completion)(&data->fib_event_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff8881124ec240 (&data->fib_lock){+.+.}-{4:4}, at: nsim_fib_event_work+0x26b/0x3180
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/u10:2/40:
5 locks held by kworker/u10:9/1097:
 #0: ffff8881110c4948 ((wq_completion)btree_update#2){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc90006e67bc0 ((work_completion)(&c->btree_interior_update_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff888129384398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
 #3: ffff888121ef41b0 (bcachefs_btree){+.+.}-{0:0}, at: bch2_trans_begin+0xbe0/0x2310
 #4: ffff8881293e1358 (&c->fsck_error_msgs_lock){+.+.}-{4:4}, at: __bch2_fsck_err+0x3a3/0x1000
2 locks held by getty/5668:
 #0: ffff88801b6f90a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70
 #1: ffffc900029032f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x43e/0x1400
4 locks held by kworker/1:2H/6701:
 #0: ffff88811d86d948 ((wq_completion)bcachefs_btree_write_complete){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9000255fbc0 ((work_completion)(&wb->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff888131684398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0xaf/0x220
 #3: ffff8881316a6710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
4 locks held by kworker/1:7/8324:
 #0: ffff888104a73d48 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9000313fbc0 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff888022ee4198 (&dev->mutex){....}-{4:4}, at: hub_event+0x184/0x4a20
 #3: ffff88810de11198 (&dev->mutex){....}-{4:4}, at: __device_attach+0x88/0x400
6 locks held by syz-executor/11716:
 #0: ffff888025f8c0e0 (&type->s_umount_key#54){++++}-{4:4}, at: deactivate_super+0xa9/0xe0
 #1: ffff888131680278 (&c->state_lock){++++}-{4:4}, at: __bch2_fs_stop+0xf8/0x900
 #2: ffff8881316caf68 (&j->reclaim_lock){+.+.}-{4:4}, at: journal_flush_done+0x86/0x810
 #3: ffff888131684398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
 #4: ffff888131684740 (&wb->flushing.lock){+.+.}-{4:4}, at: btree_write_buffer_flush_seq+0x18bd/0x1a40
 #5: ffff8881316a6710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
1 lock held by bch-reclaim/loo/11900:
 #0: ffff8881316caf68 (&j->reclaim_lock){+.+.}-{4:4}, at: bch2_journal_reclaim_thread+0x16b/0x4f0
3 locks held by syz.8.1714/15186:
5 locks held by syz.7.1722/15211:

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

NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 34 Comm: khungtaskd Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094 #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: 1089 Comm: kworker/u10:4 Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094 #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: wg-kex-wg2 wg_packet_handshake_send_worker
RIP: 0010:kasan_check_range+0x9b/0x2c0
Code: 01 00 00 00 00 fc ff df 4d 8d 34 19 4d 89 f4 4d 29 dc 49 83 fc 10 7f 29 4d 85 e4 0f 84 41 01 00 00 4c 89 cb 48 f7 d3 4c 01 fb <41> 80 3b 00 0f 85 de 01 00 00 49 ff c3 48 ff c3 75 ee e9 21 01 00
RSP: 0018:ffffc90006e06720 EFLAGS: 00000282
RAX: 00068a9f8a5d4501 RBX: fffffffffffffffe RCX: ffffffff84ca2fc9
RDX: 0000000000000001 RSI: 0000000000000028 RDI: ffffc90006e06e88
RBP: ffffc90006e07330 R08: ffffc90006e06eaf R09: 1ffff92000dc0dd5
R10: dffffc0000000000 R11: fffff52000dc0dd4 R12: 0000000000000005
R13: 0003a32895f3e9a6 R14: fffff52000dc0dd6 R15: 1ffff92000dc0dd1
FS:  0000000000000000(0000) GS:ffff8881a3c1c000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fed6f00e000 CR3: 0000000126c66000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 __asan_memcpy+0x40/0x70
 curve25519_generic+0x1009/0xa200
 curve25519_base_arch+0x2fa8/0x2fb0
 wg_noise_handshake_create_initiation+0x232/0x7e0
 wg_packet_handshake_send_worker+0x163/0x320
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>
