INFO: task kworker/u9:3:2180 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:3    state:D stack:17952 pid:2180  tgid:2180  ppid:2      task_flags:0x4248060 flags:0x00004000
Workqueue: writeback wb_workfn (flush-bcachefs-292)
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>
INFO: task syz.5.1505:16690 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.5.1505      state:D stack:17448 pid:16690 tgid:16689 ppid:14852  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:0x7f8d1d98ebe9
RSP: 002b:00007f8d1e852038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f8d1dbb5fa0 RCX: 00007f8d1d98ebe9
RDX: 000000000208e24b RSI: 0000200000000040 RDI: 0000000000000005
RBP: 00007f8d1da11e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f8d1dbb6038 R14: 00007f8d1dbb5fa0 R15: 00007ffe66df6538
 </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
3 locks held by kworker/u9:3/2180:
 #0: ffff88801b3a7148 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9000a267bc0 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff88803ab1a0e0 (&type->s_umount_key#56){++++}-{4:4}, at: super_trylock_shared+0x20/0xf0
2 locks held by getty/5675:
 #0: ffff888027f070a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70
 #1: ffffc900026682f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x43e/0x1400
3 locks held by kworker/u8:2/5723:
 #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
 #2: ffff888136625918 (&base->lock){-.-.}-{2:2}, at: __mod_timer+0x1ae/0xf30
3 locks held by syz-executor/14252:
2 locks held by syz.5.1505/16690:
 #0: ffff888044ff46f8 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x247/0x320
 #1: ffff88803ab1a428 (sb_writers#14){.+.+}-{0:0}, at: vfs_write+0x211/0xb30
1 lock held by syz.8.2711/22478:
 #0: ffff88803ccda0e0 (&type->s_umount_key#59){++++}-{4:4}, at: super_lock+0x2a9/0x3b0
5 locks held by kworker/0:0/22488:
 #0: ffff88801bb23548 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc90006557bc0 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff8880218ea198 (&dev->mutex){....}-{4:4}, at: hub_event+0x184/0x4a20
 #3: ffff88802d9a2198 (&dev->mutex){....}-{4:4}, at: __device_attach+0x88/0x400
 #4: ffff888104bc0a78 (&(&priv->bus_notifier)->rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x54/0x90
4 locks held by udevd/22502:
 #0: ffff88802b30cc30 (&p->lock){+.+.}-{4:4}, at: seq_read_iter+0xb7/0xe10
 #1: ffff88812c60bc88 (&of->mutex#2){+.+.}-{4:4}, at: kernfs_seq_start+0x55/0x3c0
 #2: ffff88802d454008 (kn->active#33){++++}-{0:0}, at: kernfs_seq_start+0x75/0x3c0
 #3: ffff88802d9a2198 (&dev->mutex){....}-{4:4}, at: serial_show+0x26/0xa0
1 lock held by syz.4.2790/23009:

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

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: 14252 Comm: syz-executor 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:__sanitizer_cov_trace_pc+0x0/0x70
Code: 89 fb e8 23 00 00 00 48 8b 3d 64 59 fe 0b 48 89 de 5b e9 43 9d 58 00 cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <f3> 0f 1e fa 48 8b 04 24 65 48 8b 0c 25 08 50 a0 92 65 8b 15 88 a4
RSP: 0018:ffffc90003baf6c8 EFLAGS: 00000246
RAX: ffffffff8241ffbb RBX: ffff8880326036a0 RCX: 0000000000000000
RDX: ffff888025919cc0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000002 R08: ffff8880326037d3 R09: 1ffff110064c06fa
R10: dffffc0000000000 R11: ffffed10064c06fb R12: 0000000000000000
R13: ffff888032603650 R14: ffff8880326035d0 R15: 1ffff110064c06d4
FS:  0000555560aad500(0000) GS:ffff8880b861b000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000110c3a09f7 CR3: 0000000028f00000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 writeback_single_inode+0xaa/0x6a0
 sync_inode_metadata+0xb9/0x110
 f2fs_write_checkpoint+0xb06/0x1df0
 kill_f2fs_super+0x2c3/0x6c0
 deactivate_locked_super+0xbc/0x130
 cleanup_mnt+0x425/0x4c0
 task_work_run+0x1d4/0x260
 exit_to_user_mode_loop+0xec/0x110
 do_syscall_64+0x2bd/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f486b38ff17
Code: a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffe5ade2da8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 00007f486b411c05 RCX: 00007f486b38ff17
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffe5ade2e60
RBP: 00007ffe5ade2e60 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffe5ade3ef0
R13: 00007f486b411c05 R14: 000000000007dac1 R15: 00007ffe5ade3f30
 </TASK>
