INFO: task kworker/u4:19:22671 blocked for more than 143 seconds. Not tainted 6.1.20-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u4:19 state:D stack:21432 pid:22671 ppid:2 flags:0x00004000 Workqueue: writeback wb_workfn (flush-7:4) Call Trace: context_switch kernel/sched/core.c:5238 [inline] __schedule+0x1391/0x4390 kernel/sched/core.c:6551 schedule+0xbf/0x180 kernel/sched/core.c:6627 rwsem_down_write_slowpath+0xe93/0x14a0 kernel/locking/rwsem.c:1189 f2fs_down_write fs/f2fs/f2fs.h:2207 [inline] f2fs_balance_fs+0x4fb/0x6c0 fs/f2fs/segment.c:418 f2fs_write_inode+0x4c3/0x540 fs/f2fs/inode.c:757 write_inode fs/fs-writeback.c:1440 [inline] __writeback_single_inode+0x84d/0x15d0 fs/fs-writeback.c:1652 writeback_sb_inodes+0xbe3/0x1b10 fs/fs-writeback.c:1878 __writeback_inodes_wb+0x114/0x400 fs/fs-writeback.c:1949 wb_writeback+0x518/0x1070 fs/fs-writeback.c:2054 wb_check_old_data_flush fs/fs-writeback.c:2154 [inline] wb_do_writeback fs/fs-writeback.c:2207 [inline] wb_workfn+0xcc3/0x10f0 fs/fs-writeback.c:2235 process_one_work+0x909/0x1380 kernel/workqueue.c:2289 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436 kthread+0x268/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Showing all locks held in the system: 1 lock held by rcu_tasks_kthre/12: #0: ffffffff8cf27470 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510 1 lock held by rcu_tasks_trace/13: #0: ffffffff8cf27c70 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510 1 lock held by khungtaskd/28: #0: ffffffff8cf272a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30 4 locks held by kworker/u4:3/51: #0: ffff888017bae938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x77b/0x1380 #1: ffffc90000bc7d20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7be/0x1380 kernel/workqueue.c:2264 #2: ffff8880379a20e0 (&type->s_umount_key#88){++++}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:415 #3: ffff88803cc01140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2207 [inline] #3: ffff88803cc01140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x4fb/0x6c0 fs/f2fs/segment.c:418 2 locks held by getty/3316: #0: ffff88814b754098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244 #1: ffffc900031262f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2177 4 locks held by kworker/u4:8/16820: #0: ffff888017bae938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x77b/0x1380 #1: ffffc90005c17d20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7be/0x1380 kernel/workqueue.c:2264 #2: ffff88803e03e0e0 (&type->s_umount_key#88){++++}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:415 #3: ffff8880291c1140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2207 [inline] #3: ffff8880291c1140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x4fb/0x6c0 fs/f2fs/segment.c:418 4 locks held by kworker/u4:19/22671: #0: ffff888017bae938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x77b/0x1380 #1: ffffc90005f2fd20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7be/0x1380 kernel/workqueue.c:2264 #2: ffff8880262ae0e0 (&type->s_umount_key#88){++++}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:415 #3: ffff88802d271140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2207 [inline] #3: ffff88802d271140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x4fb/0x6c0 fs/f2fs/segment.c:418 2 locks held by syz-executor.4/23119: 2 locks held by syz-executor.5/23163: 3 locks held by syz-executor.0/23166: ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.1.20-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111 nmi_trigger_cpumask_backtrace+0x1b0/0x3f0 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline] watchdog+0xff3/0x1040 kernel/hung_task.c:377 kthread+0x268/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 23163 Comm: syz-executor.5 Not tainted 6.1.20-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 RIP: 0010:lock_is_held_type+0x14b/0x180 kernel/locking/lockdep.c:5717 Code: 00 75 46 41 f7 c4 00 02 00 00 74 01 fb 65 48 8b 04 25 28 00 00 00 48 3b 44 24 08 75 3c 89 e8 48 83 c4 10 5b 41 5c 41 5d 41 5e <41> 5f 5d c3 0f 0b 48 c7 c7 20 d3 eb 8a e8 03 17 00 00 65 c7 05 f8 RSP: 0018:ffffc9000d6fd888 EFLAGS: 00000282 RAX: 0000000000000000 RBX: 1ffff92001adfb14 RCX: 0000000080000001 RDX: 0000000000000000 RSI: ffffffff8aebe4a0 RDI: ffffffff8b3d2900 RBP: 0000000000000000 R08: dffffc0000000000 R09: fffffbfff1ca5dae R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92001adfb34 R13: ffffffff83cd4d5b R14: dffffc0000000000 R15: ffffffff8cf27220 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000c018ecb000 CR3: 0000000020b2c000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 000000009b007100 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: lock_is_held include/linux/lockdep.h:283 [inline] rcu_read_lock_sched_held+0x89/0x130 kernel/rcu/update.c:125 trace_lock_release include/trace/events/lock.h:69 [inline] lock_release+0x10b/0xab0 kernel/locking/lockdep.c:5680 up_read+0x12/0x20 kernel/locking/rwsem.c:1615 check_valid_map fs/f2fs/gc.c:960 [inline] gc_data_segment fs/f2fs/gc.c:1511 [inline] do_garbage_collect+0x1c5b/0x7940 fs/f2fs/gc.c:1740 f2fs_gc+0xcf3/0x24a0 fs/f2fs/gc.c:1838 f2fs_balance_fs+0x506/0x6c0 fs/f2fs/segment.c:419 f2fs_write_single_data_page+0x1186/0x2060 fs/f2fs/data.c:2885 f2fs_write_cache_pages fs/f2fs/data.c:3101 [inline] __f2fs_write_data_pages fs/f2fs/data.c:3251 [inline] f2fs_write_data_pages+0x1978/0x2e60 fs/f2fs/data.c:3278 do_writepages+0x3a2/0x670 mm/page-writeback.c:2469 filemap_fdatawrite_wbc+0x121/0x180 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] file_write_and_wait_range+0x1ca/0x2b0 mm/filemap.c:774 f2fs_do_sync_file+0x7c9/0x1df0 fs/f2fs/file.c:275 generic_write_sync include/linux/fs.h:2897 [inline] f2fs_file_write_iter+0x7e0/0x2c50 fs/f2fs/file.c:4729 __kernel_write_iter+0x2ff/0x710 fs/read_write.c:517 dump_emit_page fs/coredump.c:881 [inline] dump_user_range+0x43d/0x8e0 fs/coredump.c:908 elf_core_dump+0x3cff/0x45b0 fs/binfmt_elf.c:2312 do_coredump+0x18b7/0x2700 fs/coredump.c:755 get_signal+0x1454/0x17d0 kernel/signal.c:2844 arch_do_signal_or_restart+0xb0/0x1a10 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:203 irqentry_exit_to_user_mode+0x5/0x30 kernel/entry/common.c:309 exc_page_fault+0x5a4/0x860 arch/x86/mm/fault.c:1578 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570 RIP: 0033:0x7f1aaaa27ec7 Code: 38 5d 41 5c c3 48 8d 3d ad ea 0b 00 e8 72 f8 ff ff 48 8d 3d af ea 0b 00 e8 66 f8 ff ff 66 0f 1f 44 00 00 55 89 fd 48 83 ec 10 <64> 8b 04 25 b4 ff ff ff 85 c0 74 2a 89 fe 31 c0 bf 3c 00 00 00 e8 RSP: 002b:00007f1aab6f71a0 EFLAGS: 00010206 RAX: 0000000000000000 RBX: 00007f1aaababf80 RCX: 00007f1aaaa8c0f9 RDX: 00007f1aab6f71c0 RSI: 00007f1aab6f72f0 RDI: 000000000000000b RBP: 000000000000000b R08: 0000000000000000 R09: 0000000000000058 R10: 00007f1aab716050 R11: 0000000000000246 R12: 0000000000000058 R13: 00007ffeea156c0f R14: 00007f1aab716300 R15: 0000000000022000