INFO: task syz.8.1584:14834 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.8.1584      state:D stack:17448 pid:14834 tgid:14833 ppid:13112  task_flags:0x440140 flags:0x00004006
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 schedule_timeout+0x12b/0x270
 __closure_sync_timeout+0x282/0x3a0
 __bch2_wait_on_allocator+0x112/0x240
 __bch2_write+0x31ef/0x3900
 __bch2_writepage+0x1536/0x2790
 write_cache_pages+0x64/0x100
 bch2_writepages+0xf9/0x2d0
 do_writepages+0x32e/0x550
 file_write_and_wait_range+0x23e/0x340
 bch2_fsync+0x127/0x330
 bch2_write_iter+0x2822/0x2b90
 vfs_write+0x5c9/0xb30
 ksys_write+0x145/0x250
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8f0278ebe9
RSP: 002b:00007f8f03525038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f8f029c5fa0 RCX: 00007f8f0278ebe9
RDX: 00000000b0121dc9 RSI: 0000200000000040 RDI: 0000000000000006
RBP: 00007f8f02811e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f8f029c6038 R14: 00007f8f029c5fa0 R15: 00007fff46e875d8
 </TASK>
INFO: task kworker/u9:19:15122 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u9:19   state:D stack:20584 pid:15122 tgid:15122 ppid:2      task_flags:0x4248060 flags:0x00004000
Workqueue: writeback wb_workfn (flush-bcachefs-239)
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 schedule_timeout+0x12b/0x270
 __closure_sync_timeout+0x282/0x3a0
 __bch2_wait_on_allocator+0x112/0x240
 __bch2_write+0x31ef/0x3900
 __bch2_writepage+0x1536/0x2790
 write_cache_pages+0x64/0x100
 bch2_writepages+0xf9/0x2d0
 do_writepages+0x32e/0x550
 __writeback_single_inode+0x145/0xff0
 writeback_sb_inodes+0x6c7/0x1010
 __writeback_inodes_wb+0x111/0x240
 wb_writeback+0x44f/0xaf0
 wb_workfn+0xaef/0xef0
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 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: ffffffff8e139f20 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180
2 locks held by getty/5680:
 #0: ffff888022c360a0 (&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
9 locks held by kworker/0:3/5907:
 #0: ffff888104be9548 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9000444fbc0 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff888108624198 (&dev->mutex){....}-{4:4}, at: hub_event+0x184/0x4a20
 #3: ffff88810869d198 (&dev->mutex){....}-{4:4}, at: __device_attach+0x88/0x400
 #4: ffff88810869b160 (&dev->mutex){....}-{4:4}, at: __device_attach+0x88/0x400
 #5: ffff88803cf75a20 (&dev->mutex){....}-{4:4}, at: __device_attach+0x88/0x400
 #6: ffff88803cf75e28 (&hdev->ll_open_lock){+.+.}-{4:4}, at: hid_hw_open+0x29/0x1f0
 #7: ffff88802bc1a8f0 (&usbhid->mutex){+.+.}-{4:4}, at: usbhid_open+0x58/0x310
 #8: ffff88804b039f98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140
2 locks held by kworker/u10:30/8111:
 #0: ffff88801f669148 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9000470fbc0 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
2 locks held by syz.8.1584/14834:
 #0: ffff88811fded6f8 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x247/0x320
 #1: ffff88810fe2e428 (sb_writers#14){.+.+}-{0:0}, at: vfs_write+0x211/0xb30
2 locks held by kworker/u9:11/15111:
 #0: ffff88801f669148 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc90002dcfbc0 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
2 locks held by kworker/u9:12/15113:
 #0: ffff88801f669148 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc90003f1fbc0 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
2 locks held by kworker/u9:17/15119:
 #0: ffff88801f669148 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc90002e57bc0 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
3 locks held by kworker/u9:19/15122:
 #0: ffff8881026be148 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc900028dfbc0 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff88810fe2e0e0 (&type->s_umount_key#58){++++}-{4:4}, at: super_trylock_shared+0x20/0xf0

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

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: 0 Comm: swapper/0 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:pv_native_safe_halt+0x13/0x20
Code: 53 e7 02 00 cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa eb 07 0f 00 2d 73 67 0e 00 f3 0f 1e fa fb f4 <c3> cc cc cc cc cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffffff8de07d80 EFLAGS: 00000282
RAX: 7497282f9c063400 RBX: ffffffff819683c8 RCX: 7497282f9c063400
RDX: 0000000000000001 RSI: ffffffff8d9b8241 RDI: ffffffff8be33880
RBP: ffffffff8de07eb8 R08: ffff88804b032f9b R09: 1ffff110096065f3
R10: dffffc0000000000 R11: ffffed10096065f4 R12: ffffffff8fa39030
R13: 0000000000000000 R14: 0000000000000000 R15: 1ffffffff1bd2a20
FS:  0000000000000000(0000) GS:ffff8880b8618000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055555638a5c8 CR3: 000000002a8c0000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 default_idle+0x13/0x20
 default_idle_call+0x74/0xb0
 do_idle+0x1e8/0x510
 cpu_startup_entry+0x44/0x60
 rest_init+0x2de/0x300
 start_kernel+0x3a9/0x410
 x86_64_start_reservations+0x24/0x30
 x86_64_start_kernel+0x143/0x1c0
 common_startup_64+0x13e/0x147
 </TASK>
