INFO: task syz.0.145:6629 blocked for more than 143 seconds.
      Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094-dirty #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.145       state:D stack:28712 pid:6629  tgid:6625  ppid:5842   task_flags:0x400040 flags:0x00004004
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 schedule_preempt_disabled+0x13/0x30
 rwsem_down_write_slowpath+0x872/0xfe0
 down_write_nested+0x1b5/0x200
 filename_create+0x1f8/0x3c0
 do_mknodat+0x184/0x4d0
 __x64_sys_mknod+0x8c/0xa0
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f19c878ebe9
RSP: 002b:00007f19c955f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000085
RAX: ffffffffffffffda RBX: 00007f19c89b6090 RCX: 00007f19c878ebe9
RDX: 0000000000000000 RSI: 0000000000000800 RDI: 0000200000000100
RBP: 00007f19c8811e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f19c89b6128 R14: 00007f19c89b6090 R15: 00007ffe556e0dd8
 </TASK>
INFO: task syz.0.145:6630 blocked for more than 143 seconds.
      Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094-dirty #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.145       state:D stack:28744 pid:6630  tgid:6625  ppid:5842   task_flags:0x400040 flags:0x00004004
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 schedule_preempt_disabled+0x13/0x30
 rwsem_down_write_slowpath+0x872/0xfe0
 down_write+0x1ab/0x1f0
 path_openat+0x8da/0x3830
 do_filp_open+0x1fa/0x410
 do_sys_openat2+0x121/0x1c0
 __x64_sys_creat+0x8f/0xc0
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f19c878ebe9
RSP: 002b:00007f19c953e038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 00007f19c89b6180 RCX: 00007f19c878ebe9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000200000000e00
RBP: 00007f19c8811e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f19c89b6218 R14: 00007f19c89b6180 R15: 00007ffe556e0dd8
 </TASK>
INFO: task syz.0.145:6631 blocked for more than 144 seconds.
      Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094-dirty #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.145       state:D stack:26344 pid:6631  tgid:6625  ppid:5842   task_flags:0x400040 flags:0x00004004
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 schedule_preempt_disabled+0x13/0x30
 rwsem_down_write_slowpath+0x872/0xfe0
 down_write_nested+0x1b5/0x200
 filename_create+0x1f8/0x3c0
 do_mknodat+0x184/0x4d0
 __x64_sys_mknod+0x8c/0xa0
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f19c878ebe9
RSP: 002b:00007f19c951d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000085
RAX: ffffffffffffffda RBX: 00007f19c89b6270 RCX: 00007f19c878ebe9
RDX: 0000000000000701 RSI: 0000000000000000 RDI: 0000200000000000
RBP: 00007f19c8811e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f19c89b6308 R14: 00007f19c89b6270 R15: 00007ffe556e0dd8
 </TASK>

Showing all locks held in the system:
1 lock held by pool_workqueue_/3:
 #0: ffffffff8e13f978 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x3b9/0x730
1 lock held by khungtaskd/35:
 #0: ffffffff8e139ee0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180
2 locks held by getty/5671:
 #0: ffff888106ca00a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70
 #1: ffffc900025082f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x43e/0x1400
2 locks held by syz-executor/5848:
 #0: ffff8881118880e0 (&type->s_umount_key#51){+.+.}-{4:4}, at: deactivate_super+0xa9/0xe0
 #1: ffff888111888950 (&s->s_sync_lock){+.+.}-{4:4}, at: sync_inodes_sb+0x255/0xa10
4 locks held by kworker/u10:4/5901:
 #0: ffff88801b6f5948 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc900045afbc0 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff8881127b00e0 (&type->s_umount_key#70){++++}-{4:4}, at: super_trylock_shared+0x20/0xf0
 #3: ffff88811a402fe0 (&jfs_ip->commit_mutex){+.+.}-{4:4}, at: jfs_commit_inode+0x1ca/0x530
5 locks held by kworker/u12:3/6389:
 #0: ffff888011f29148 ((wq_completion)bcachefs){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc900063f7bc0 ((work_completion)(&wp->index_update_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff888030a04398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
 #3: ffff888030a00920 (&c->sb_lock){+.+.}-{4:4}, at: bch2_mark_replicas_slowpath+0x233/0x580
 #4: ffff888030a049d8 (&c->mark_lock){++++}-{0:0}, at: bch2_mark_replicas_slowpath+0x3d6/0x580
4 locks held by syz.0.145/6626:
2 locks held by syz.0.145/6629:
 #0: ffff8881127b0428 (sb_writers#18){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90
 #1: ffff88811a403390 (&type->i_mutex_dir_key#11/1){+.+.}-{4:4}, at: filename_create+0x1f8/0x3c0
2 locks held by syz.0.145/6630:
 #0: ffff8881127b0428 (sb_writers#18){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90
 #1: ffff88811a403390 (&type->i_mutex_dir_key#12){++++}-{4:4}, at: path_openat+0x8da/0x3830
2 locks held by syz.0.145/6631:
 #0: ffff8881127b0428 (sb_writers#18){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90
 #1: ffff88811a403390 (&type->i_mutex_dir_key#11/1){+.+.}-{4:4}, at: filename_create+0x1f8/0x3c0
7 locks held by kworker/u9:14/7098:
 #0: ffff888039c24148 ((wq_completion)btree_update){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0
 #1: ffffc9000466fbc0 ((work_completion)(&c->btree_interior_update_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0
 #2: ffff888030a04398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
 #3: ffff8880004301b0 (bcachefs_btree){+.+.}-{0:0}, at: __bch2_trans_get+0x7f4/0xd80
 #4: ffff888030a4b148 (journal res){.+.+}-{0:0}, at: bch2_journal_res_get+0x6a9/0x8f0
 #5: ffff888030a049d8 (&c->mark_lock){++++}-{0:0}, at: bch2_accounting_mem_insert+0x438/0xad0
 #6: ffffffff8e13f978 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x3b9/0x730
1 lock held by syz.6.698/9881:
 #0: ffffffff8f537cc8 (rtnl_mutex){+.+.}-{4:4}, at: tun_chr_close+0x3e/0x1c0
1 lock held by syz.6.698/9884:
1 lock held by syz.6.698/9885:
 #0: ffffffff8e9c5068 (reading_mutex){+.+.}-{4:4}, at: rng_dev_read+0x17b/0x770

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

NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 35 Comm: khungtaskd Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094-dirty #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: 5848 Comm: syz-executor Not tainted 6.17.0-rc1-syzkaller-00036-gdfc0f6373094-dirty #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:unwind_next_frame+0x374/0x2390
Code: ea 48 01 d2 48 01 f2 48 bd 00 00 00 00 00 fc ff df 0f 84 37 01 00 00 4c 8d 62 04 4c 8d 6a 05 4c 89 e0 48 c1 e8 03 0f b6 04 28 <84> c0 0f 85 6d 19 00 00 4c 89 e8 48 c1 e8 03 0f b6 04 28 84 c0 0f
RSP: 0018:ffffc900000076b8 EFLAGS: 00000a06
RAX: 0000000000000000 RBX: ffffffff8fba4054 RCX: ffffffff8fba405c
RDX: ffffffff9037aa96 RSI: ffffffff9037aa96 RDI: ffffffff8be333a0
RBP: dffffc0000000000 R08: 000000000000000c R09: ffffffff8172c195
R10: ffffc900000077d8 R11: ffffffff81ac3870 R12: ffffffff9037aa9a
R13: ffffffff9037aa9b R14: ffffc90000007788 R15: ffffffff8fba4058
FS:  000055556335a500(0000) GS:ffff8880b861c000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000060000 CR3: 000000010909c000 CR4: 00000000000006f0
Call Trace:
 <IRQ>
 arch_stack_walk+0x11c/0x150
 stack_trace_save+0x9c/0xe0
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x46/0x50
 __kasan_slab_free+0x5b/0x80
 kfree+0x18e/0x440
 security_task_free+0xa4/0x1b0
 __put_task_struct+0xfd/0x460
 rcu_core+0xcab/0x1770
 handle_softirqs+0x286/0x870
 __irq_exit_rcu+0xca/0x1f0
 irq_exit_rcu+0x9/0x30
 sysvec_apic_timer_interrupt+0xa6/0xc0
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20
RIP: 0010:vprintk_emit+0x58f/0x7a0
Code: 85 32 01 00 00 e8 c1 86 1f 00 41 89 df 4d 85 f6 48 8b 1c 24 75 07 e8 b0 86 1f 00 eb 06 e8 a9 86 1f 00 fb 48 c7 c7 80 e1 12 8e <31> f6 ba 01 00 00 00 31 c9 41 b8 01 00 00 00 45 31 c9 53 e8 b9 35
RSP: 0018:ffffc9000363f9e0 EFLAGS: 00000293
RAX: ffffffff81a024e7 RBX: ffffffff81a023a4 RCX: ffff888020de0000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8e12e180
RBP: ffffc9000363faf0 R08: ffffffff8fa37e37 R09: 1ffffffff1f46fc6
R10: dffffc0000000000 R11: fffffbfff1f46fc7 R12: dffffc0000000000
R13: 1ffff920006c7f40 R14: 0000000000000200 R15: 000000000000001f
 __bch2_print+0x176/0x220
 __bch2_fs_stop+0xc8/0x900
 generic_shutdown_super+0x135/0x2c0
 bch2_kill_sb+0x41/0x50
 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:0x7f98d9f8ff17
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:00007ffcac5d5cb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 00007f98da011c05 RCX: 00007f98d9f8ff17
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffcac5d5d70
RBP: 00007ffcac5d5d70 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffcac5d6e00
R13: 00007f98da011c05 R14: 000000000003d9b5 R15: 00007ffcac5d6e40
 </TASK>
