INFO: task bch-reclaim/loo:7965 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:bch-reclaim/loo state:D stack:18824 pid:7965  tgid:7965  ppid:2      task_flags:0x200040 flags:0x00004000
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 schedule_preempt_disabled+0x13/0x30
 __mutex_lock+0x7e6/0x1350
 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/0:0H/11:
 #0: ffff888023ba7148 ((wq_completion)bcachefs_btree_write_complete){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc900000e7bc0 ((work_completion)(&wb->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff888032004398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_trans_srcu_lock+0xaf/0x220
 #3: ffff888032026710 (&c->gc_lock){.+.+}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
1 lock held by khungtaskd/34:
 #0: ffffffff8e139f20 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180
2 locks held by kworker/u9:2/53:
 #0: ffff88801ed29148 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc900007bfbc0 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
2 locks held by kworker/u9:7/1093:
 #0: ffff88801ed29148 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc90006d97bc0 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
2 locks held by getty/5674:
 #0: ffff88810f0760a0 (&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
2 locks held by kworker/u8:3/5874:
3 locks held by kworker/1:4/5903:
 #0: ffff88801a480d48 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc90004ecfbc0 ((fqdir_free_work).work){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffffffff8e13f880 (rcu_state.barrier_mutex){+.+.}-{4:4}, at: rcu_barrier+0x4c/0x570
6 locks held by syz-executor/6349:
 #0: ffff88811d4e60e0 (&type->s_umount_key#83){+.+.}-{4:4}, at: deactivate_super+0xa9/0xe0
 #1: ffff888032000278 (&c->state_lock){+.+.}-{4:4}, at: __bch2_fs_stop+0xf8/0x900
 #2: ffff88803204af68 (&j->reclaim_lock){+.+.}-{4:4}, at: journal_flush_done+0x86/0x810
 #3: ffff888032004398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
 #4: ffff888032004740 (&wb->flushing.lock){+.+.}-{4:4}, at: btree_write_buffer_flush_seq+0x18bd/0x1a40
 #5: ffff888032026710 (&c->gc_lock){.+.+}-{4:4}, at: bch2_btree_update_start+0x542/0x1de0
1 lock held by bch-reclaim/loo/7965:
 #0: ffff88803204af68 (&j->reclaim_lock){+.+.}-{4:4}, at: bch2_journal_reclaim_thread+0x16b/0x4f0
2 locks held by kworker/u10:16/8875:
 #0: ffff88801ed29148 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc900066cfbc0 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
2 locks held by syz.6.905/10416:
 #0: ffff88804b039f98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140
 #1: ffff88804b024008 (psi_seq){-.-.}-{0:0}, at: psi_task_switch+0x53/0x880
1 lock held by syz.4.906/10418:
 #0: ffff8881096a4260 (&mm->mmap_lock){++++}-{4:4}, at: vm_mmap_pgoff+0x211/0x4d0
2 locks held by syz.4.906/10424:

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

NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 34 Comm: khungtaskd Not tainted syzkaller #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: 10424 Comm: syz.4.906 Not tainted syzkaller #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:kasan_check_range+0x50/0x2c0
Code: 49 b9 00 00 00 00 00 80 ff ff eb 11 cc cc cc f3 0f 1e fa 49 b9 00 00 00 00 00 00 00 ff f3 0f 1e fa 4c 39 cf 0f 82 58 02 00 00 <49> 89 ff 49 c1 ef 03 49 ba 00 00 00 00 00 fc ff df 4f 8d 1c 17 49
RSP: 0018:ffffc9000251f8a8 EFLAGS: 00000206
RAX: ffffffff81fa7f01 RBX: ffffea0001038600 RCX: ffffffff81fa7f6b
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffea0001038600
RBP: ffffc9000251f9b0 R08: ffffea0001038608 R09: ffff800000000000
R10: dffffc0000000000 R11: fffff940002070c7 R12: ffffea0001038608
R13: dffffc0000000000 R14: 0000000000000000 R15: 1ffff920004a3f20
FS:  00007ff937b1e6c0(0000) GS:ffff8880b8618000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000110c43c6b0 CR3: 000000010f2a8000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 folio_mark_accessed+0xcb/0x8b0
 follow_page_pte+0xc64/0x13e0
 __get_user_pages+0xa8e/0x2ce0
 populate_vma_page_range+0x29f/0x3a0
 __mm_populate+0x24c/0x380
 vm_mmap_pgoff+0x387/0x4d0
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff936d8ebe9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff937b1e038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007ff936fc6180 RCX: 00007ff936d8ebe9
RDX: b635773f06ebbeee RSI: 0000000000b36000 RDI: 0000200000000000
RBP: 00007ff936e11e19 R08: ffffffffffffffff R09: 0000000000000000
R10: 0000000000008031 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ff936fc6218 R14: 00007ff936fc6180 R15: 00007ffdfee6c238
 </TASK>
