INFO: task syz-executor.3:16983 blocked for more than 143 seconds. Not tainted 6.2.0-rc5-next-20230127-syzkaller-08766-ge2f86c02fdc9 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.3 state:D stack:27272 pid:16983 ppid:5146 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5301 [inline] __schedule+0x245a/0x5a60 kernel/sched/core.c:6619 schedule+0xde/0x1a0 kernel/sched/core.c:6695 io_schedule+0xbe/0x130 kernel/sched/core.c:8881 folio_wait_bit_common+0x394/0x9b0 mm/filemap.c:1299 folio_lock include/linux/pagemap.h:950 [inline] extent_write_cache_pages+0x639/0xd00 fs/btrfs/extent_io.c:2624 extent_writepages+0x1ae/0x450 fs/btrfs/extent_io.c:2764 do_writepages+0x1a8/0x640 mm/page-writeback.c:2551 filemap_fdatawrite_wbc mm/filemap.c:388 [inline] filemap_fdatawrite_wbc+0x147/0x1b0 mm/filemap.c:378 __filemap_fdatawrite_range+0xb8/0xf0 mm/filemap.c:421 btrfs_release_file+0x131/0x180 fs/btrfs/file.c:1720 __fput+0x27c/0xa90 fs/file_table.c:321 task_work_run+0x16f/0x270 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:297 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fab26a3df7b RSP: 002b:00007ffdd23e5de0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007fab26a3df7b RDX: 0000001b2bf20000 RSI: 0000001b2bf347b8 RDI: 0000000000000004 RBP: 00007fab26bad980 R08: 0000000000000000 R09: 000000002ff5c5b8 R10: 00007ffdd23eb090 R11: 0000000000000293 R12: 00000000000c9678 R13: 00007ffdd23e5ee0 R14: 00007ffdd23e5f00 R15: 0000000000000032 INFO: task syz-executor.3:16987 blocked for more than 144 seconds. Not tainted 6.2.0-rc5-next-20230127-syzkaller-08766-ge2f86c02fdc9 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.3 state:D stack:24712 pid:16987 ppid:5146 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5301 [inline] __schedule+0x245a/0x5a60 kernel/sched/core.c:6619 schedule+0xde/0x1a0 kernel/sched/core.c:6695 wait_on_state fs/btrfs/extent-io-tree.c:707 [inline] wait_extent_bit+0x56e/0x670 fs/btrfs/extent-io-tree.c:751 lock_extent+0x120/0x1c0 fs/btrfs/extent-io-tree.c:1742 find_lock_delalloc_range+0x27e/0x6e0 fs/btrfs/extent_io.c:488 writepage_delalloc+0x16a/0x3e0 fs/btrfs/extent_io.c:1419 __extent_writepage+0xff0/0x15a0 fs/btrfs/extent_io.c:1726 extent_write_cache_pages+0x445/0xd00 fs/btrfs/extent_io.c:2644 extent_writepages+0x1ae/0x450 fs/btrfs/extent_io.c:2764 do_writepages+0x1a8/0x640 mm/page-writeback.c:2551 filemap_fdatawrite_wbc mm/filemap.c:388 [inline] filemap_fdatawrite_wbc+0x147/0x1b0 mm/filemap.c:378 __filemap_fdatawrite_range+0xb8/0xf0 mm/filemap.c:421 btrfs_fdatawrite_range+0x4a/0x110 fs/btrfs/file.c:3857 start_ordered_ops.constprop.0+0xaa/0x110 fs/btrfs/file.c:1737 btrfs_sync_file+0x2b1/0x1440 fs/btrfs/file.c:1813 vfs_fsync_range+0x13e/0x230 fs/sync.c:188 generic_write_sync include/linux/fs.h:2452 [inline] btrfs_do_write_iter+0x67d/0x1470 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+0x9ed/0xe10 fs/read_write.c:584 ksys_write+0x12b/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fab26a8c0c9 RSP: 002b:00007fab255fe168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fab26babf80 RCX: 00007fab26a8c0c9 RDX: 0000000000000128 RSI: 0000000020004400 RDI: 0000000000000006 RBP: 00007fab26ae7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdd23e5d7f R14: 00007fab255fe300 R15: 0000000000022000 INFO: task syz-executor.3:17030 blocked for more than 144 seconds. Not tainted 6.2.0-rc5-next-20230127-syzkaller-08766-ge2f86c02fdc9 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.3 state:D stack:26624 pid:17030 ppid:5146 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5301 [inline] __schedule+0x245a/0x5a60 kernel/sched/core.c:6619 schedule+0xde/0x1a0 kernel/sched/core.c:6695 io_schedule+0xbe/0x130 kernel/sched/core.c:8881 folio_wait_bit_common+0x394/0x9b0 mm/filemap.c:1299 lock_page include/linux/pagemap.h:971 [inline] btrfs_page_mkwrite+0x773/0x1190 fs/btrfs/inode.c:8149 do_page_mkwrite+0x19b/0x680 mm/memory.c:2925 wp_page_shared mm/memory.c:3274 [inline] do_wp_page+0x356/0x3520 mm/memory.c:3356 handle_pte_fault mm/memory.c:4929 [inline] __handle_mm_fault+0x19a1/0x3e60 mm/memory.c:5053 handle_mm_fault+0x1b6/0x850 mm/memory.c:5199 do_user_addr_fault+0x475/0x1230 arch/x86/mm/fault.c:1407 handle_page_fault arch/x86/mm/fault.c:1498 [inline] exc_page_fault+0x98/0x170 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:ffffc90003c6f730 EFLAGS: 00050202 RAX: 0000000000000001 RBX: 0000000000000038 RCX: 0000000000000007 RDX: 0000000000000000 RSI: ffffc90003c6f7a0 RDI: 0000000020000120 RBP: 0000000020000120 R08: 0000000000000000 R09: ffffc90003c6f7d7 R10: fffff5200078defa R11: 0000000000000000 R12: 00007fffffffefc8 R13: ffffc90003c6f7a0 R14: 0000000020000120 R15: ffffc90003c6f7a0 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 lib/usercopy.c:34 [inline] _copy_to_user+0x127/0x150 lib/usercopy.c:27 copy_to_user include/linux/uaccess.h:169 [inline] fiemap_fill_next_extent+0x217/0x370 fs/ioctl.c:144 emit_fiemap_extent+0x18e/0x380 fs/btrfs/extent_io.c:3011 fiemap_process_hole+0x21c/0x610 fs/btrfs/extent_io.c:3222 extent_fiemap+0x121e/0x1920 fs/btrfs/extent_io.c:3483 btrfs_fiemap+0xe9/0x170 fs/btrfs/inode.c:7831 ioctl_fiemap fs/ioctl.c:219 [inline] do_vfs_ioctl+0x466/0x1670 fs/ioctl.c:810 __do_sys_ioctl fs/ioctl.c:868 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x10c/0x210 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fab26a8c0c9 RSP: 002b:00007fab1e1dd168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fab26bac050 RCX: 00007fab26a8c0c9 RDX: 0000000020000100 RSI: 00000000c020660b RDI: 0000000000000005 RBP: 00007fab26ae7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdd23e5d7f R14: 00007fab1e1dd300 R15: 0000000000022000 Showing all locks held in the system: 1 lock held by rcu_tasks_kthre/13: #0: ffffffff8c794970 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x31/0xd80 kernel/rcu/tasks.h:516 1 lock held by rcu_tasks_trace/14: #0: ffffffff8c794670 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x31/0xd80 kernel/rcu/tasks.h:516 1 lock held by khungtaskd/28: #0: ffffffff8c795540 ( rcu_read_lock ){....}-{1:2} , at: debug_show_all_locks+0x51/0x390 kernel/locking/lockdep.c:6544 1 lock held by udevd/4440: #0: ffff888146bbd4c8 ( &disk->open_mutex ){+.+.}-{3:3}, at: blkdev_get_by_dev.part.0+0x9b/0xb80 block/bdev.c:735 2 locks held by getty/4758: #0: ffff88802771a098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x26/0x80 drivers/tty/tty_ldisc.c:244 #1: ffffc900015902f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xef4/0x13e0 drivers/tty/n_tty.c:2177 3 locks held by kworker/u4:4/5163: #0: ffff88814519c938 ((wq_completion)writeback){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff88814519c938 ((wq_completion)writeback){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline] #0: ffff88814519c938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1280 [inline] #0: ffff88814519c938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:639 [inline] #0: ffff88814519c938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:666 [inline] #0: ffff88814519c938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x86d/0x1820 kernel/workqueue.c:2361 #1: ffffc900047bfda8 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x8a1/0x1820 kernel/workqueue.c:2365 #2: ffff88807c9740e0 (&type->s_umount_key#49){++++}-{3:3}, at: trylock_super+0x21/0x110 fs/super.c:415 2 locks held by syz-executor.3/16987: #0: ffff88807bbb80e8 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe7/0x100 fs/file.c:1046 #1: ffff88807c974460 (sb_writers#13){.+.+}-{0:0}, at: ksys_write+0x12b/0x250 fs/read_write.c:637 3 locks held by syz-executor.3/17030: #0: ffff888029716498 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #0: ffff888029716498 (&mm->mmap_lock){++++}-{3:3}, at: do_user_addr_fault+0x276/0x1230 arch/x86/mm/fault.c:1348 #1: ffff88807c974558 (sb_pagefaults#2){.+.+}-{0:0}, at: do_page_mkwrite+0x19b/0x680 mm/memory.c:2925 #2: ffff8880736896d0 (&ei->i_mmap_lock){++++}-{3:3}, at: btrfs_page_mkwrite+0x6df/0x1190 fs/btrfs/inode.c:8148 1 lock held by syz-executor.3/17075: #0: ffff888146bbd4c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xc0/0x770 block/bdev.c:833 5 locks held by syz-executor.5/21055: 4 locks held by kvm-nx-lpage-re/21060: #0: ffffffff8c7db9c8 (cgroup_mutex){+.+.}-{3:3}, at: cgroup_attach_task_all+0x25/0x140 kernel/cgroup/cgroup-v1.c:61 #1: ffffffff8c63ef50 (cpu_hotplug_lock){++++}-{0:0}, at: cgroup_attach_lock+0x11/0x40 kernel/cgroup/cgroup.c:2435 #2: ffffffff8c7db790 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: cgroup_attach_lock+0x35/0x40 kernel/cgroup/cgroup.c:2437 #3: ffffffff8c7a0978 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:293 [inline] (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x64a/0x770 kernel/rcu/tree_exp.h:992 2 locks held by syz-executor.4/21079: #0: ffff888077a460a8 (&nft_net->commit_mutex){+.+.}-{3:3}, at: nf_tables_valid_genid+0x31/0xc0 net/netfilter/nf_tables_api.c:9554 #1: ffffffff8c7a0978 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:325 [inline] #1: ffffffff8c7a0978 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x3e8/0x770 kernel/rcu/tree_exp.h:992 1 lock held by syz-executor.3/21081: #0: ffff8880b983c258 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2f/0x120 kernel/sched/core.c:539 ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.2.0-rc5-next-20230127-syzkaller-08766-ge2f86c02fdc9 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 nmi_cpu_backtrace+0x316/0x3e0 lib/nmi_backtrace.c:113 nmi_trigger_cpumask_backtrace+0x38f/0x440 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+0xe53/0x11b0 kernel/hung_task.c:377 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 21079 Comm: syz-executor.4 Not tainted 6.2.0-rc5-next-20230127-syzkaller-08766-ge2f86c02fdc9 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 RIP: 0010:__bfs+0x394/0x720 kernel/locking/lockdep.c:1804 Code: bb 01 00 00 49 8b 01 49 39 c0 75 27 e9 70 fd ff ff 48 89 c6 4c 89 78 30 48 c1 ee 03 42 80 3c 36 00 0f 85 77 01 00 00 48 8b 00 <4c> 39 c0 0f 84 4e fd ff ff 48 8d 78 30 48 89 fe 48 c1 ee 03 42 80 RSP: 0018:ffffc90003306bf0 EFLAGS: 00000046 RAX: ffffffff9156e490 RBX: 0000000000000020 RCX: ffffffff81655068 RDX: 1ffffffff22ad24c RSI: 1ffffffff22adb96 RDI: ffffffff9156dce0 RBP: 0000000000000000 R08: ffffffff913d9900 R09: ffffffff91564080 R10: 0000000000000003 R11: 0000000000000003 R12: ffff88802a0c8a60 R13: ffffffff91569260 R14: dffffc0000000000 R15: ffffffff91569250 FS: 00007f24741a2700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b33821000 CR3: 00000000215aa000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __bfs_forwards kernel/locking/lockdep.c:1837 [inline] check_path.constprop.0+0x24/0x50 kernel/locking/lockdep.c:2148 check_noncircular+0x13f/0x2e0 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3107 [inline] check_prevs_add kernel/locking/lockdep.c:3226 [inline] validate_chain kernel/locking/lockdep.c:3841 [inline] __lock_acquire+0x2f21/0x5df0 kernel/locking/lockdep.c:5073 lock_acquire.part.0+0x11c/0x370 kernel/locking/lockdep.c:5690 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3d/0x60 kernel/locking/spinlock.c:162 prepare_to_wait_event+0x1f/0x6a0 kernel/sched/wait.c:310 synchronize_rcu_expedited+0x5c3/0x770 kernel/rcu/tree_exp.h:1007 synchronize_rcu+0x2f1/0x3a0 kernel/rcu/tree.c:3486 __nf_tables_abort+0x107d/0x36e0 net/netfilter/nf_tables_api.c:9517 nf_tables_abort+0x2f/0x50 net/netfilter/nf_tables_api.c:9542 nfnetlink_rcv_batch+0xef3/0x2420 net/netfilter/nfnetlink.c:583 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:639 [inline] nfnetlink_rcv+0x3b3/0x420 net/netfilter/nfnetlink.c:657 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1942 sock_sendmsg_nosec net/socket.c:722 [inline] sock_sendmsg+0xde/0x190 net/socket.c:745 ____sys_sendmsg+0x71c/0x900 net/socket.c:2501 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2555 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2584 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f247348c0c9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f24741a2168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f24735abf80 RCX: 00007f247348c0c9 RDX: 000000000000c040 RSI: 0000000020000080 RDI: 0000000000000005 RBP: 00007f24734e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffffa001edf R14: 00007f24741a2300 R15: 0000000000022000