INFO: task kworker/u4:8:10397 blocked for more than 143 seconds. Not tainted 6.5.0-rc2-syzkaller-00221-gf7e3a1bafdea #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u4:8 state:D stack:20712 pid:10397 ppid:2 flags:0x00004000 Workqueue: events_unbound btrfs_async_reclaim_metadata_space Call Trace: context_switch kernel/sched/core.c:5381 [inline] __schedule+0x1873/0x48f0 kernel/sched/core.c:6710 schedule+0xc3/0x180 kernel/sched/core.c:6786 io_schedule+0x8c/0x100 kernel/sched/core.c:9028 folio_wait_bit_common+0x86c/0x12b0 mm/filemap.c:1304 btrfs_page_start_writer_lock+0x71/0x2f0 fs/btrfs/subpage.c:344 process_one_page fs/btrfs/extent_io.c:233 [inline] __process_pages_contig+0x4ab/0xd50 fs/btrfs/extent_io.c:285 lock_delalloc_pages+0x16a/0x250 fs/btrfs/extent_io.c:346 find_lock_delalloc_range+0x44d/0x980 fs/btrfs/extent_io.c:423 writepage_delalloc+0x1bd/0x490 fs/btrfs/extent_io.c:1235 __extent_writepage fs/btrfs/extent_io.c:1492 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2160 [inline] extent_writepages+0x14bd/0x2d00 fs/btrfs/extent_io.c:2286 do_writepages+0x3a6/0x670 mm/page-writeback.c:2553 filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:393 start_delalloc_inodes+0x7e1/0xcb0 fs/btrfs/inode.c:9409 btrfs_start_delalloc_roots+0x745/0xab0 fs/btrfs/inode.c:9488 shrink_delalloc fs/btrfs/space-info.c:623 [inline] flush_space+0x6a0/0xe70 fs/btrfs/space-info.c:731 btrfs_async_reclaim_metadata_space+0x29f/0x350 fs/btrfs/space-info.c:1078 process_one_work+0x92c/0x12c0 kernel/workqueue.c:2597 worker_thread+0xa63/0x1210 kernel/workqueue.c:2748 kthread+0x2b8/0x350 kernel/kthread.c:389 ret_from_fork+0x2e/0x60 arch/x86/kernel/process.c:145 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:296 RIP: 0000:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 INFO: task syz-executor.3:29715 blocked for more than 145 seconds. Not tainted 6.5.0-rc2-syzkaller-00221-gf7e3a1bafdea #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.3 state:D stack:24848 pid:29715 ppid:5057 flags:0x00004006 Call Trace: context_switch kernel/sched/core.c:5381 [inline] __schedule+0x1873/0x48f0 kernel/sched/core.c:6710 schedule+0xc3/0x180 kernel/sched/core.c:6786 io_schedule+0x8c/0x100 kernel/sched/core.c:9028 folio_wait_bit_common+0x86c/0x12b0 mm/filemap.c:1304 folio_lock include/linux/pagemap.h:959 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2140 [inline] extent_writepages+0xcea/0x2d00 fs/btrfs/extent_io.c:2286 do_writepages+0x3a6/0x670 mm/page-writeback.c:2553 filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:393 __filemap_fdatawrite_range mm/filemap.c:426 [inline] __filemap_fdatawrite mm/filemap.c:432 [inline] filemap_flush+0x11e/0x170 mm/filemap.c:459 btrfs_release_file+0x117/0x130 fs/btrfs/file.c:1709 __fput+0x3f8/0x950 fs/file_table.c:384 task_work_run+0x24a/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7eff7047ba1a RSP: 002b:00007ffff4452190 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000009 RCX: 00007eff7047ba1a RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008 RBP: 00007eff7059d980 R08: 0000001b2ee20000 R09: 0000000000000025 R10: 000000008ac6685f R11: 0000000000000293 R12: 000000000016729f R13: ffffffffffffffff R14: 00007eff70000000 R15: 0000000000166365 INFO: task syz-executor.3:29789 blocked for more than 146 seconds. Not tainted 6.5.0-rc2-syzkaller-00221-gf7e3a1bafdea #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.3 state:D stack:24600 pid:29789 ppid:5057 flags:0x00004006 Call Trace: context_switch kernel/sched/core.c:5381 [inline] __schedule+0x1873/0x48f0 kernel/sched/core.c:6710 schedule+0xc3/0x180 kernel/sched/core.c:6786 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:6845 rwsem_down_write_slowpath+0xedd/0x13a0 kernel/locking/rwsem.c:1178 __down_write_common+0x1aa/0x200 kernel/locking/rwsem.c:1306 inode_lock include/linux/fs.h:771 [inline] btrfs_inode_lock+0x4d/0xd0 fs/btrfs/inode.c:377 btrfs_buffered_write+0x230/0x1380 fs/btrfs/file.c:1199 btrfs_do_write_iter+0x2b4/0x1020 fs/btrfs/file.c:1670 do_iter_write+0x84f/0xde0 fs/read_write.c:860 iter_file_splice_write+0x86d/0x1010 fs/splice.c:739 do_splice_from fs/splice.c:934 [inline] direct_splice_actor+0xea/0x1c0 fs/splice.c:1143 splice_direct_to_actor+0x376/0x9e0 fs/splice.c:1089 do_splice_direct+0x2ac/0x3f0 fs/splice.c:1195 do_sendfile+0x623/0x1070 fs/read_write.c:1254 __do_sys_sendfile64 fs/read_write.c:1322 [inline] __se_sys_sendfile64+0x17c/0x1e0 fs/read_write.c:1308 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:0x7eff7047cb29 RSP: 002b:00007eff7116f0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007eff7059c050 RCX: 00007eff7047cb29 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000007 RBP: 00007eff704c847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000008800000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007eff7059c050 R15: 00007ffff44520c8 INFO: task syz-executor.3:29790 blocked for more than 148 seconds. Not tainted 6.5.0-rc2-syzkaller-00221-gf7e3a1bafdea #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.3 state:D stack:23512 pid:29790 ppid:5057 flags:0x00004006 Call Trace: context_switch kernel/sched/core.c:5381 [inline] __schedule+0x1873/0x48f0 kernel/sched/core.c:6710 schedule+0xc3/0x180 kernel/sched/core.c:6786 wait_on_state fs/btrfs/extent-io-tree.c:719 [inline] wait_extent_bit+0x50c/0x670 fs/btrfs/extent-io-tree.c:763 lock_extent+0x1c0/0x270 fs/btrfs/extent-io-tree.c:1755 btrfs_page_mkwrite+0x5bd/0xd10 fs/btrfs/inode.c:8271 do_page_mkwrite+0x1a4/0x600 mm/memory.c:2942 wp_page_shared mm/memory.c:3294 [inline] do_wp_page+0x559/0x3a70 mm/memory.c:3376 handle_pte_fault mm/memory.c:4955 [inline] __handle_mm_fault mm/memory.c:5079 [inline] handle_mm_fault+0x1c58/0x5410 mm/memory.c:5233 do_user_addr_fault arch/x86/mm/fault.c:1392 [inline] handle_page_fault arch/x86/mm/fault.c:1486 [inline] exc_page_fault+0x266/0x7c0 arch/x86/mm/fault.c:1542 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 RIP: 0010:rep_movs_alternative+0x33/0xb0 arch/x86/lib/copy_user_64.S:58 Code: 40 83 f9 08 73 21 85 c9 74 0f 8a 06 88 07 48 ff c7 48 ff c6 48 ff c9 75 f1 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 8b 06 <48> 89 07 48 83 c6 08 48 83 c7 08 83 e9 08 74 df 83 f9 08 73 e8 eb RSP: 0018:ffffc9000b6bf4d0 EFLAGS: 00050206 RAX: 0000000000000000 RBX: 0000000020001318 RCX: 0000000000000038 RDX: 0000000000000000 RSI: ffffc9000b6bf580 RDI: 00000000200012e0 RBP: ffffc9000b6bf638 R08: ffffc9000b6bf5b7 R09: 1ffff920016d7eb6 R10: dffffc0000000000 R11: fffff520016d7eb7 R12: 0000000000000038 R13: ffffc9000b6bf580 R14: 00000000200012e0 R15: ffffc9000b6bf580 copy_user_generic arch/x86/include/asm/uaccess_64.h:112 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:133 [inline] _copy_to_user+0x86/0xa0 lib/usercopy.c:41 copy_to_user include/linux/uaccess.h:191 [inline] fiemap_fill_next_extent+0x235/0x410 fs/ioctl.c:144 emit_fiemap_extent+0x256/0x410 fs/btrfs/extent_io.c:2532 extent_fiemap+0xeee/0x1fe0 fs/btrfs/extent_io.c:3022 btrfs_fiemap+0x178/0x1e0 fs/btrfs/inode.c:7943 ioctl_fiemap fs/ioctl.c:219 [inline] do_vfs_ioctl+0x19db/0x2b30 fs/ioctl.c:810 __do_sys_ioctl fs/ioctl.c:868 [inline] __se_sys_ioctl+0x81/0x170 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:0x7eff7047cb29 RSP: 002b:00007eff7114e0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007eff7059c120 RCX: 00007eff7047cb29 RDX: 00000000200012c0 RSI: 00000000c020660b RDI: 0000000000000004 RBP: 00007eff704c847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007eff7059c120 R15: 00007ffff44520c8 Showing all locks held in the system: 2 locks held by kworker/u4:0/10: 1 lock held by rcu_tasks_kthre/13: #0: ffffffff8d328af0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:522 1 lock held by rcu_tasks_trace/14: #0: ffffffff8d328eb0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:522 1 lock held by khungtaskd/28: #0: ffffffff8d328920 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30 2 locks held by getty/4770: #0: ffff8880291a6098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243 #1: ffffc900015b02f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6b1/0x1dc0 drivers/tty/n_tty.c:2187 4 locks held by kworker/u4:8/10397: #0: ffff888012879138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2569 #1: ffffc9000bf1fd00 ((work_completion)(&fs_info->async_reclaim_work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2571 #2: ffff88801776ced0 (&fs_info->delalloc_root_mutex){+.+.}-{3:3}, at: btrfs_start_delalloc_roots+0x1c6/0xab0 fs/btrfs/inode.c:9469 #3: ffff88803b1c8758 (&root->delalloc_mutex){+.+.}-{3:3}, at: start_delalloc_inodes+0x1ac/0xcb0 fs/btrfs/inode.c:9374 3 locks held by kworker/u4:3/27400: #0: ffff88801329e938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x7e3/0x12c0 kernel/workqueue.c:2569 #1: ffffc900176ffd00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x82b/0x12c0 kernel/workqueue.c:2571 #2: ffff8880368740e0 (&type->s_umount_key#62){++++}-{3:3}, at: trylock_super+0x1f/0xf0 fs/super.c:413 2 locks held by syz-executor.3/29789: #0: ffff888036874410 (sb_writers#15){.+.+}-{0:0}, at: do_sendfile+0x600/0x1070 fs/read_write.c:1253 #1: ffff88803652e2b0 (&sb->s_type->i_mutex_key#24){++++}-{3:3}, at: inode_lock include/linux/fs.h:771 [inline] #1: ffff88803652e2b0 (&sb->s_type->i_mutex_key#24){++++}-{3:3}, at: btrfs_inode_lock+0x4d/0xd0 fs/btrfs/inode.c:377 4 locks held by syz-executor.3/29790: #0: ffff88803652e2b0 (&sb->s_type->i_mutex_key#24){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:781 [inline] #0: ffff88803652e2b0 (&sb->s_type->i_mutex_key#24){++++}-{3:3}, at: btrfs_inode_lock+0x60/0xd0 fs/btrfs/inode.c:369 #1: ffff88802221ea20 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:161 [inline] #1: ffff88802221ea20 (&mm->mmap_lock){++++}-{3:3}, at: get_mmap_lock_carefully mm/memory.c:5261 [inline] #1: ffff88802221ea20 (&mm->mmap_lock){++++}-{3:3}, at: lock_mm_and_find_vma+0x32/0x2f0 mm/memory.c:5323 #2: ffff888036874508 (sb_pagefaults){.+.+}-{0:0}, at: do_page_mkwrite+0x1a4/0x600 mm/memory.c:2942 #3: ffff88803652e138 (&ei->i_mmap_lock){++++}-{3:3}, at: btrfs_page_mkwrite+0x49c/0xd10 fs/btrfs/inode.c:8260 1 lock held by btrfs-cleaner/29781: #0: ffff88801776e018 (&fs_info->reclaim_bgs_lock){+.+.}-{3:3}, at: btrfs_delete_unused_bgs+0xf5/0x9d0 fs/btrfs/block-group.c:1449 1 lock held by udevadm/31301: ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.5.0-rc2-syzkaller-00221-gf7e3a1bafdea #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 nmi_cpu_backtrace+0x498/0x4d0 lib/nmi_backtrace.c:113 nmi_trigger_cpumask_backtrace+0x187/0x300 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:222 [inline] watchdog+0xec2/0xf00 kernel/hung_task.c:379 kthread+0x2b8/0x350 kernel/kthread.c:389 ret_from_fork+0x2e/0x60 arch/x86/kernel/process.c:145 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:296 RIP: 0000:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 31300 Comm: syz-executor.1 Not tainted 6.5.0-rc2-syzkaller-00221-gf7e3a1bafdea #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 RIP: 0033:0x7ffb6c42871b Code: cd 48 01 c1 49 39 4f 08 72 4c 8d 4d ff 85 ed 74 33 66 0f 1f 44 00 00 48 39 f0 72 1b 4d 8b 07 49 89 c1 49 29 f1 47 0f b6 0c 08 <45> 84 c9 74 08 45 88 0c 00 49 8b 47 10 48 83 c0 01 49 89 47 10 83 RSP: 002b:00007ffb6d240520 EFLAGS: 00000202 RAX: 00000000011d0db1 RBX: 00007ffb6d2405c0 RCX: 0000000000000012 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00007ffb6d240660 RBP: 0000000000000102 R08: 00007ffb62bff000 R09: 0000000000000000 R10: 0000000000000000 R11: 00007ffb6d2405d0 R12: 0000000000000001 R13: 00007ffb6c4ea340 R14: 0000000000000000 R15: 00007ffb6d240660 FS: 00007ffb6d2416c0 GS: 0000000000000000