INFO: task kworker/u4:3:42 blocked for more than 143 seconds. Not tainted 6.2.0-syzkaller-13563-gf915322fe014 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u4:3 state:D stack:20864 pid:42 ppid:2 flags:0x00004000 Workqueue: writeback wb_workfn (flush-btrfs-394) Call Trace: context_switch kernel/sched/core.c:5304 [inline] __schedule+0x17d8/0x4990 kernel/sched/core.c:6622 schedule+0xc3/0x180 kernel/sched/core.c:6698 io_schedule+0x8c/0x100 kernel/sched/core.c:8884 folio_wait_bit_common+0x86c/0x12b0 mm/filemap.c:1301 folio_lock include/linux/pagemap.h:952 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2615 [inline] extent_writepages+0xa65/0x1930 fs/btrfs/extent_io.c:2755 do_writepages+0x3a6/0x670 mm/page-writeback.c:2551 __writeback_single_inode+0x1c4/0x15e0 fs/fs-writeback.c:1600 writeback_sb_inodes+0x92c/0x1360 fs/fs-writeback.c:1891 __writeback_inodes_wb+0x11b/0x260 fs/fs-writeback.c:1962 wb_writeback+0x51c/0x1080 fs/fs-writeback.c:2067 wb_check_background_flush fs/fs-writeback.c:2133 [inline] wb_do_writeback fs/fs-writeback.c:2221 [inline] wb_workfn+0xd80/0x1100 fs/fs-writeback.c:2248 process_one_work+0x915/0x13a0 kernel/workqueue.c:2390 worker_thread+0xa63/0x1210 kernel/workqueue.c:2537 kthread+0x270/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 INFO: task syz-executor.3:22721 blocked for more than 144 seconds. Not tainted 6.2.0-syzkaller-13563-gf915322fe014 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.3 state:D stack:23688 pid:22721 ppid:5108 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5304 [inline] __schedule+0x17d8/0x4990 kernel/sched/core.c:6622 schedule+0xc3/0x180 kernel/sched/core.c:6698 wait_on_state fs/btrfs/extent-io-tree.c:707 [inline] wait_extent_bit+0x50c/0x670 fs/btrfs/extent-io-tree.c:751 lock_extent+0x1ce/0x280 fs/btrfs/extent-io-tree.c:1742 find_lock_delalloc_range+0x4c9/0x9a0 fs/btrfs/extent_io.c:487 writepage_delalloc+0x1f1/0x590 fs/btrfs/extent_io.c:1417 __extent_writepage+0x939/0x1860 fs/btrfs/extent_io.c:1724 extent_write_cache_pages fs/btrfs/extent_io.c:2635 [inline] extent_writepages+0xc31/0x1930 fs/btrfs/extent_io.c:2755 do_writepages+0x3a6/0x670 mm/page-writeback.c:2551 filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:390 __filemap_fdatawrite_range mm/filemap.c:423 [inline] filemap_fdatawrite_range+0x16e/0x1e0 mm/filemap.c:441 btrfs_fdatawrite_range fs/btrfs/file.c:3857 [inline] start_ordered_ops+0xea/0x220 fs/btrfs/file.c:1737 btrfs_sync_file+0x463/0x11e0 fs/btrfs/file.c:1813 generic_write_sync include/linux/fs.h:2452 [inline] btrfs_do_write_iter+0xccc/0x1270 fs/btrfs/file.c:1684 call_write_iter include/linux/fs.h:1851 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7b2/0xbb0 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fca40c8c0f9 RSP: 002b:00007fca4197e168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fca40dabf80 RCX: 00007fca40c8c0f9 RDX: 0000000000000001 RSI: 0000000020000100 RDI: 0000000000000005 RBP: 00007fca40ce7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffee493b1cf R14: 00007fca4197e300 R15: 0000000000022000 INFO: task syz-executor.3:22766 blocked for more than 145 seconds. Not tainted 6.2.0-syzkaller-13563-gf915322fe014 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.3 state:D stack:23872 pid:22766 ppid:5108 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5304 [inline] __schedule+0x17d8/0x4990 kernel/sched/core.c:6622 schedule+0xc3/0x180 kernel/sched/core.c:6698 io_schedule+0x8c/0x100 kernel/sched/core.c:8884 folio_wait_bit_common+0x86c/0x12b0 mm/filemap.c:1301 btrfs_page_mkwrite+0x42d/0xc90 fs/btrfs/inode.c:8148 do_page_mkwrite+0x1a1/0x600 mm/memory.c:2925 wp_page_shared mm/memory.c:3274 [inline] do_wp_page+0x501/0x3620 mm/memory.c:3356 handle_pte_fault mm/memory.c:4927 [inline] __handle_mm_fault mm/memory.c:5051 [inline] handle_mm_fault+0x23a0/0x51c0 mm/memory.c:5197 do_user_addr_fault arch/x86/mm/fault.c:1407 [inline] handle_page_fault arch/x86/mm/fault.c:1498 [inline] exc_page_fault+0x685/0x8a0 arch/x86/mm/fault.c:1554 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 RIP: 0010:copy_user_short_string+0xd/0x40 arch/x86/lib/copy_user_64.S:233 Code: 74 0a 89 d1 f3 a4 89 c8 0f 01 ca c3 89 d0 0f 01 ca c3 01 ca eb e7 0f 1f 80 00 00 00 00 89 d1 83 e2 07 c1 e9 03 74 12 4c 8b 06 <4c> 89 07 48 8d 76 08 48 8d 7f 08 ff c9 75 ee 21 d2 74 10 89 d1 8a RSP: 0018:ffffc9000aec7330 EFLAGS: 00050202 RAX: ffffffff843e4201 RBX: 00007fffffffefc8 RCX: 0000000000000007 RDX: 0000000000000000 RSI: ffffc9000aec73e0 RDI: 0000000020000060 RBP: ffffc9000aec7488 R08: 0000000000000000 R09: fffff520015d8e83 R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000038 R13: ffffc9000aec73e0 R14: 0000000020000060 R15: ffffc9000aec73e0 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:58 [inline] _copy_to_user+0xed/0x130 lib/usercopy.c:41 copy_to_user include/linux/uaccess.h:169 [inline] fiemap_fill_next_extent+0x235/0x410 fs/ioctl.c:144 emit_fiemap_extent+0x242/0x3f0 fs/btrfs/extent_io.c:3002 fiemap_process_hole+0xa27/0xaf0 fs/btrfs/extent_io.c:3260 extent_fiemap+0xe5b/0x2150 fs/btrfs/extent_io.c:3467 btrfs_fiemap+0x178/0x1e0 fs/btrfs/inode.c:7830 ioctl_fiemap fs/ioctl.c:219 [inline] do_vfs_ioctl+0x19ba/0x2b10 fs/ioctl.c:810 __do_sys_ioctl fs/ioctl.c:868 [inline] __se_sys_ioctl+0x81/0x160 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fca40c8c0f9 RSP: 002b:00007fca4195d168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fca40dac050 RCX: 00007fca40c8c0f9 RDX: 0000000020000040 RSI: 00000000c020660b RDI: 0000000000000004 RBP: 00007fca40ce7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffee493b1cf R14: 00007fca4195d300 R15: 0000000000022000 Showing all locks held in the system: 1 lock held by rcu_tasks_kthre/12: #0: ffffffff8d1279f0 (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: ffffffff8d1281f0 (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: ffffffff8d127820 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30 3 locks held by kworker/u4:3/42: #0: ffff8880177fb938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc90000b37d20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 #2: ffff888032fb20e0 (&type->s_umount_key#75){++++}-{3:3}, at: trylock_super+0x1f/0xf0 fs/super.c:414 3 locks held by kworker/u4:5/1104: 2 locks held by kworker/1:2/4396: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc90004ba7d20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:3/4735: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc9000372fd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by getty/4752: #0: ffff88814a006098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:244 #1: ffffc900015a02f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6ab/0x1db0 drivers/tty/n_tty.c:2177 2 locks held by syz-executor.1/5113: #0: ffff88802054e0e0 (&type->s_umount_key#73){++++}-{3:3}, at: deactivate_super+0xad/0xf0 fs/super.c:361 #1: ffffffff8d12cef8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:293 [inline] #1: ffffffff8d12cef8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x3a3/0x890 kernel/rcu/tree_exp.h:989 1 lock held by syz-executor.5/5116: #0: ffffffff8d12cef8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:325 [inline] #0: ffffffff8d12cef8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x46c/0x890 kernel/rcu/tree_exp.h:989 2 locks held by kworker/1:4/5157: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc900044f7d20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:5/5160: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc90004537d20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:6/5161: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc90004557d20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:10/5533: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc90005a7fd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:12/5535: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc90005a9fd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:16/5697: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc9000a1bfd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:17/6315: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc90003bbfd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:18/8162: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc900036cfd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:20/16663: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc900050ffd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:24/16669: #0: ffff888012472538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc9000582fd20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:25/16670: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc9000583fd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:28/16673: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc9000587fd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:31/16677: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc900058afd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by kworker/1:32/18318: #0: ffff888012470d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77f/0x13a0 #1: ffffc9001478fd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7c6/0x13a0 kernel/workqueue.c:2365 2 locks held by syz-executor.3/22721: #0: ffff88807ca91c68 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x254/0x2f0 fs/file.c:1046 #1: ffff888032fb2460 (sb_writers#15){.+.+}-{0:0}, at: vfs_write+0x26d/0xbb0 fs/read_write.c:580 4 locks held by syz-executor.3/22766: #0: ffff888039a40ef0 (&sb->s_type->i_mutex_key#23){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:768 [inline] #0: ffff888039a40ef0 (&sb->s_type->i_mutex_key#23){++++}-{3:3}, at: btrfs_inode_lock+0x60/0xd0 fs/btrfs/inode.c:169 #1: ffff8880259b0198 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #1: ffff8880259b0198 (&mm->mmap_lock){++++}-{3:3}, at: do_user_addr_fault arch/x86/mm/fault.c:1348 [inline] #1: ffff8880259b0198 (&mm->mmap_lock){++++}-{3:3}, at: handle_page_fault arch/x86/mm/fault.c:1498 [inline] #1: ffff8880259b0198 (&mm->mmap_lock){++++}-{3:3}, at: exc_page_fault+0x18d/0x8a0 arch/x86/mm/fault.c:1554 #2: ffff888032fb2558 (sb_pagefaults){.+.+}-{0:0}, at: do_page_mkwrite+0x1a1/0x600 mm/memory.c:2925 #3: ffff888039a40d78 (&ei->i_mmap_lock){++++}-{3:3}, at: btrfs_page_mkwrite+0x425/0xc90 fs/btrfs/inode.c:8147 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.2.0-syzkaller-13563-gf915322fe014 #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+0x1e7/0x2d0 lib/dump_stack.c:106 nmi_cpu_backtrace+0x4e5/0x560 lib/nmi_backtrace.c:113 nmi_trigger_cpumask_backtrace+0x1b4/0x410 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:222 [inline] watchdog+0x1024/0x1070 kernel/hung_task.c:379 kthread+0x270/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 16669 Comm: kworker/1:24 Not tainted 6.2.0-syzkaller-13563-gf915322fe014 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Workqueue: events nsim_dev_trap_report_work RIP: 0010:get_page_from_freelist+0x406/0x3970 mm/page_alloc.c:4278 Code: 48 8b 84 24 b0 01 00 00 48 8b 4c 24 10 48 8d 1c c1 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 0d ed 0b 00 4c 8b 3b <48> 8b 44 24 10 48 8d 58 20 48 89 d8 48 c1 e8 03 48 89 84 24 f8 00 RSP: 0018:ffffc9000582f580 EFLAGS: 00000246 RAX: 1ffff11027fff5c1 RBX: ffff88813fffae08 RCX: ffff88813fffae00 RDX: 0000000000000000 RSI: 0000000000000009 RDI: ffffc9000582f870 RBP: ffffc9000582f7f0 R08: 0000000000000000 R09: ffffed10053b1d45 R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88813fffc300 R13: dffffc0000000000 R14: 1ffff92000b05f0a R15: 0000000000000006 FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ff116d85058 CR3: 000000002b53f000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __alloc_pages+0x291/0x7f0 mm/page_alloc.c:5591 alloc_slab_page+0x6a/0x160 mm/slub.c:1851 allocate_slab mm/slub.c:1998 [inline] new_slab+0x84/0x2f0 mm/slub.c:2051 ___slab_alloc+0xa85/0x10a0 mm/slub.c:3193 __slab_alloc mm/slub.c:3292 [inline] __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] kmem_cache_alloc_node+0x1dc/0x2b0 mm/slub.c:3497 __alloc_skb+0x181/0x420 net/core/skbuff.c:598 alloc_skb include/linux/skbuff.h:1277 [inline] nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:751 [inline] nsim_dev_trap_report drivers/net/netdevsim/dev.c:808 [inline] nsim_dev_trap_report_work+0x250/0xa90 drivers/net/netdevsim/dev.c:853 process_one_work+0x915/0x13a0 kernel/workqueue.c:2390 worker_thread+0xa63/0x1210 kernel/workqueue.c:2537 kthread+0x270/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308