INFO: task syz.0.55:6299 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.55        state:D
 stack:26552 pid:6299  tgid:6263  ppid:5852   task_flags:0x400140 flags:0x00004004
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 __closure_sync+0x163/0x220
 bch2_read_iter+0x1034/0x1440
 do_iter_readv_writev+0x61c/0x8b0
 vfs_readv+0x253/0x850
 do_readv+0x14d/0x2d0
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa0ebd8ebe9
RSP: 002b:00007fa0ecb70038 EFLAGS: 00000246 ORIG_RAX: 0000000000000013
RAX: ffffffffffffffda RBX: 00007fa0ebfc6090 RCX: 00007fa0ebd8ebe9
RDX: 0000000000000002 RSI: 0000200000000bc0 RDI: 0000000000000008
RBP: 00007fa0ebe11e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa0ebfc6128 R14: 00007fa0ebfc6090 R15: 00007fffde791bf8
 </TASK>
INFO: task bch-rebalance/l:6291 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:bch-rebalance/l state:D stack:21320 pid:6291  tgid:6291  ppid:2      task_flags:0x200040 flags:0x00004000
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 bch2_move_ratelimit+0xcc3/0x1330
 bch2_rebalance_thread+0x17b0/0x1f80
 kthread+0x711/0x8a0
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Showing all locks held in the system:
2 locks held by kworker/u8:1/13:
 #0: ffff888136639f98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140
 #1: ffff888136624008 (psi_seq){-.-.}-{0:0}, at: psi_task_switch+0x53/0x880
1 lock held by khungtaskd/34:
 #0: ffffffff8e139f20 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180
4 locks held by kworker/u9:2/53:
 #0: ffff88801da87948 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc900007bfbc0 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff88810a6340e0 (&type->s_umount_key#59){++++}-{4:4}, at: super_trylock_shared+0x20/0xf0
 #3: ffff88803bf84398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
2 locks held by kworker/0:3/5314:
 #0: ffff8880246ee548 ((wq_completion)bcachefs_write_ref){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9000174fbc0 ((work_completion)(&ca->discard_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
1 lock held by dhcpcd/5593:
 #0: ffffffff8f538c48 (rtnl_mutex){+.+.}-{4:4}, at: inet6_rtm_newaddr+0x5b7/0xd20
2 locks held by getty/5672:
 #0: ffff8881067510a0 (&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
2 locks held by kworker/1:2H/6136:
 #0: ffff8880222e5548 ((wq_completion)bcachefs_btree_write_complete){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9000324fbc0 ((work_completion)(&wb->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
2 locks held by kworker/u12:3/6250:
 #0: ffff88803a607148 ((wq_completion)bcachefs){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc90003b6fbc0 ((work_completion)(&wp->index_update_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
1 lock held by syz.0.55/6299:
 #0: ffff888024a67ef8 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x247/0x320
2 locks held by kworker/0:2H/6303:
 #0: ffff8880222e5548 ((wq_completion)bcachefs_btree_write_complete){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc90003befbc0 ((work_completion)(&wb->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
5 locks held by kworker/u8:5/7963:
 #0: ffff88801b2f7148 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc900045afbc0 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffffffff8f52bdb0 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0xf7/0x800
 #3: ffffffff8f538c48 (rtnl_mutex){+.+.}-{4:4}, at: wg_netns_pre_exit+0x1c/0x1d0
 #4: ffff88802b1254e8 (&wg->device_update_lock){+.+.}-{4:4}, at: wg_netns_pre_exit+0xb0/0x1d0
1 lock held by syz.0.328/9116:
 #0: ffff88810a6340e0 (&type->s_umount_key#59){++++}-{4:4}, at: super_lock+0x25c/0x3b0
1 lock held by syz.0.328/9139:
 #0: ffff88810a6340e0 (&type->s_umount_key#59){++++}-{4:4}, at: super_lock+0x2a9/0x3b0
1 lock held by syz-executor/9527:
1 lock held by syz-executor/9576:
 #0: ffffffff8e13f9b8 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x3b9/0x730
2 locks held by syz.7.449/10354:
1 lock held by syz.7.449/10355:
 #0: ffffffff8e845c10 (tomoyo_ss){.+.+}-{0:0}, at: tomoyo_mount_permission+0x27a/0x970

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

NMI backtrace for cpu 0
CPU: 0 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 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 10354 Comm: syz.7.449 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: 0033:0x7f3f8ca50c58
Code: 85 ed 74 33 66 0f 1f 44 00 00 48 39 f0 72 1b 4d 8b 07 49 89 c1 49 29 f1 47 0f b6 0c 08 45 84 c9 74 08 45 88 0c 00 49 8b 47 10 <48> 83 c0 01 49 89 47 10 83 e9 01 73 d3 41 81 fe 00 01 00 00 0f 85
RSP: 002b:00007f3f8d9664a0 EFLAGS: 00000246
RAX: 00000000007e7e76 RBX: 00007f3f8d966540 RCX: 0000000000000011
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00007f3f8d9665e0
RBP: 0000000000000102 R08: 00007f3f82800000 R09: 0000000000000000
R10: 0000000000000000 R11: 00007f3f8d966550 R12: 0000000000000001
R13: 00007f3f8cc2da20 R14: 0000000000000000 R15: 00007f3f8d9665e0
FS:  00007f3f8d9676c0 GS:  0000000000000000
