INFO: task syz-executor.0:19507 blocked for more than 143 seconds. Not tainted 6.1.0-syzkaller-03225-g764822972d64 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.0 state:D stack:19944 pid:19507 ppid:5442 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5233 [inline] __schedule+0x995/0xe20 kernel/sched/core.c:6545 schedule+0xcb/0x190 kernel/sched/core.c:6621 io_schedule+0x83/0x100 kernel/sched/core.c:8801 folio_wait_bit_common+0x83a/0x12a0 mm/filemap.c:1296 set_page_dirty_lock+0x12/0x30 mm/page-writeback.c:2770 bio_set_pages_dirty+0x200/0x2e0 block/bio.c:1429 iomap_dio_bio_iter+0xd82/0x1680 fs/iomap/direct-io.c:348 __iomap_dio_rw+0x1234/0x20d0 fs/iomap/direct-io.c:602 iomap_dio_rw+0x42/0xa0 fs/iomap/direct-io.c:690 btrfs_dio_read+0x9c/0xe0 fs/btrfs/inode.c:8168 btrfs_direct_read fs/btrfs/file.c:3765 [inline] btrfs_file_read_iter+0x399/0x6a0 fs/btrfs/file.c:3804 do_iter_read+0x6e3/0xc10 fs/read_write.c:796 vfs_readv fs/read_write.c:916 [inline] do_preadv+0x1f4/0x330 fs/read_write.c:1008 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6b7768c0d9 RSP: 002b:00007f6b761fe168 EFLAGS: 00000246 ORIG_RAX: 0000000000000147 RAX: ffffffffffffffda RBX: 00007f6b777abf80 RCX: 00007f6b7768c0d9 RDX: 0000000000000001 RSI: 0000000020000100 RDI: 0000000000000005 RBP: 00007f6b776e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe114f092f R14: 00007f6b761fe300 R15: 0000000000022000 INFO: task syz-executor.0:19551 blocked for more than 144 seconds. Not tainted 6.1.0-syzkaller-03225-g764822972d64 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.0 state:D stack:21304 pid:19551 ppid:5442 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5233 [inline] __schedule+0x995/0xe20 kernel/sched/core.c:6545 schedule+0xcb/0x190 kernel/sched/core.c:6621 wait_on_state fs/btrfs/extent-io-tree.c:707 [inline] wait_extent_bit+0x577/0x6f0 fs/btrfs/extent-io-tree.c:751 lock_extent+0x1c2/0x280 fs/btrfs/extent-io-tree.c:1742 btrfs_page_mkwrite+0x533/0xc80 fs/btrfs/inode.c:8537 do_page_mkwrite+0x19e/0x5e0 mm/memory.c:2977 wp_page_shared+0x15e/0x380 mm/memory.c:3323 handle_pte_fault mm/memory.c:4972 [inline] __handle_mm_fault mm/memory.c:5096 [inline] handle_mm_fault+0x1e72/0x3630 mm/memory.c:5217 do_user_addr_fault+0x69b/0xcb0 arch/x86/mm/fault.c:1428 handle_page_fault arch/x86/mm/fault.c:1519 [inline] exc_page_fault+0x7a/0x110 arch/x86/mm/fault.c:1575 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570 RIP: 0010:copy_user_enhanced_fast_string+0xa/0x40 arch/x86/lib/copy_user_64.S:166 Code: ff c9 75 f2 89 d1 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 31 c0 0f 01 ca c3 8d 0c ca 89 ca eb 20 0f 01 cb 83 fa 40 72 38 89 d1 a4 31 c0 0f 01 ca c3 89 ca eb 0a 66 2e 0f 1f 84 00 00 00 00 00 RSP: 0018:ffffc9000367fe48 EFLAGS: 00050206 RAX: ffffffff843a4501 RBX: 00007fffffffec00 RCX: 0000000000000400 RDX: 0000000000000400 RSI: ffff888021d8f000 RDI: 0000000020000480 RBP: ffff88802b730598 R08: dffffc0000000000 R09: ffffed10043b1e80 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000400 R13: ffff888021d8f000 R14: 0000000020000480 R15: ffff888021d8f000 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+0xe9/0x130 lib/usercopy.c:34 copy_to_user include/linux/uaccess.h:169 [inline] btrfs_ioctl_balance+0x59d/0x740 fs/btrfs/ioctl.c:3595 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6b7768c0d9 RSP: 002b:00007f6b6eddd168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f6b777ac050 RCX: 00007f6b7768c0d9 RDX: 0000000020000480 RSI: 00000000c4009420 RDI: 0000000000000007 RBP: 00007f6b776e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe114f092f R14: 00007f6b6eddd300 R15: 0000000000022000 INFO: task syz-executor.0:19552 blocked for more than 145 seconds. Not tainted 6.1.0-syzkaller-03225-g764822972d64 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.0 state:D stack:25480 pid:19552 ppid:5442 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5233 [inline] __schedule+0x995/0xe20 kernel/sched/core.c:6545 schedule+0xcb/0x190 kernel/sched/core.c:6621 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6680 __mutex_lock_common+0xe4f/0x26e0 kernel/locking/mutex.c:679 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799 btrfs_try_lock_balance fs/btrfs/ioctl.c:3475 [inline] btrfs_ioctl_balance+0x33b/0x740 fs/btrfs/ioctl.c:3540 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6b7768c0d9 RSP: 002b:00007f6b6edbc168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f6b777ac120 RCX: 00007f6b7768c0d9 RDX: 00000000200014c0 RSI: 00000000c4009420 RDI: 0000000000000004 RBP: 00007f6b776e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe114f092f R14: 00007f6b6edbc300 R15: 0000000000022000 Showing all locks held in the system: 1 lock held by rcu_tasks_kthre/12: #0: ffffffff8d328390 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x30/0xd00 kernel/rcu/tasks.h:507 1 lock held by rcu_tasks_trace/13: #0: ffffffff8d328b90 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x30/0xd00 kernel/rcu/tasks.h:507 1 lock held by khungtaskd/28: #0: ffffffff8d3281c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30 3 locks held by kworker/u4:3/46: #0: ffff888018236138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x7f2/0xdb0 #1: ffffc90000b77d00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x831/0xdb0 kernel/workqueue.c:2264 #2: ffff888031e220e0 (&type->s_umount_key#54){++++}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:415 2 locks held by getty/3315: #0: ffff888147761098 (&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+0x53b/0x1650 drivers/tty/n_tty.c:2177 2 locks held by kworker/u4:8/14861: 1 lock held by syz-executor.0/19507: #0: ffff8880494d52e0 (&sb->s_type->i_mutex_key#22){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:766 [inline] #0: ffff8880494d52e0 (&sb->s_type->i_mutex_key#22){++++}-{3:3}, at: btrfs_inode_lock+0x5c/0xd0 fs/btrfs/inode.c:184 5 locks held by syz-executor.0/19551: #0: ffff888031e22460 (sb_writers#15){.+.+}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 fs/namespace.c:552 #1: ffff888065aa1440 (&fs_info->balance_mutex){+.+.}-{3:3}, at: btrfs_balance+0xc0c/0x1150 fs/btrfs/volumes.c:4354 #2: ffff88801dd049d8 (&mm->mmap_lock#2){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #2: ffff88801dd049d8 (&mm->mmap_lock#2){++++}-{3:3}, at: do_user_addr_fault+0x2e2/0xcb0 arch/x86/mm/fault.c:1369 #3: ffff888031e22558 (sb_pagefaults){.+.+}-{0:0}, at: do_page_mkwrite+0x19e/0x5e0 mm/memory.c:2977 #4: ffff8880494d5168 (&ei->i_mmap_lock){++++}-{3:3}, at: btrfs_page_mkwrite+0x417/0xc80 fs/btrfs/inode.c:8526 2 locks held by syz-executor.0/19552: #0: ffff888031e22460 (sb_writers#15){.+.+}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 fs/namespace.c:552 #1: ffff888065aa1440 (&fs_info->balance_mutex){+.+.}-{3:3}, at: btrfs_try_lock_balance fs/btrfs/ioctl.c:3475 [inline] #1: ffff888065aa1440 (&fs_info->balance_mutex){+.+.}-{3:3}, at: btrfs_ioctl_balance+0x33b/0x740 fs/btrfs/ioctl.c:3540 2 locks held by syz-executor.2/21171: 2 locks held by syz-executor.3/21182: #0: ffff8880b983a1d8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x25/0x110 kernel/sched/core.c:537 #1: ffff8880b9827788 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x611/0x9a0 kernel/sched/psi.c:976 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.0-syzkaller-03225-g764822972d64 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 nmi_cpu_backtrace+0x46f/0x4f0 lib/nmi_backtrace.c:111 nmi_trigger_cpumask_backtrace+0x1ba/0x420 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+0xcf5/0xd40 kernel/hung_task.c:377 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 21171 Comm: syz-executor.2 Not tainted 6.1.0-syzkaller-03225-g764822972d64 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 RIP: 0010:match_held_lock+0x2/0xb0 kernel/locking/lockdep.c:5113 Code: ff ff 31 db 48 c7 c7 00 b7 ed 8a 48 c7 c6 40 b7 ed 8a 31 c0 e8 df 55 be f6 0f 0b e9 38 ff ff ff e8 c3 fa ff ff 0f 1f 00 55 53 01 00 00 00 48 39 77 10 74 67 48 89 fb 81 7f 20 00 00 10 00 72 RSP: 0018:ffffc9000af7f5f8 EFLAGS: 00000087 RAX: 0000000000000003 RBX: 0000000000000002 RCX: 0000000080000000 RDX: ffff888019a68000 RSI: ffffffff8d3281c0 RDI: ffff888019a68aa0 RBP: ffff888019a68aa0 R08: ffffffff84267397 R09: fffffbfff20f4a29 R10: fffffbfff20f4a29 R11: 1ffffffff20f4a28 R12: 0000000000000246 R13: ffff888019a68000 R14: 00000000ffffffff R15: ffffffff8d3281c0 FS: 00007fa3c4e03700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000c001ebae3b CR3: 00000000787bb000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __lock_is_held kernel/locking/lockdep.c:5409 [inline] lock_is_held_type+0xa1/0x180 kernel/locking/lockdep.c:5711 task_css include/linux/cgroup.h:437 [inline] blkcg_css+0xf1/0x1b0 block/blk-cgroup.c:76 blk_cgroup_congested+0x80/0x1c0 block/blk-cgroup.c:1976 __cgroup_throttle_swaprate+0x6d/0x1f0 mm/swapfile.c:3638 cgroup_throttle_swaprate include/linux/swap.h:657 [inline] folio_throttle_swaprate include/linux/swap.h:666 [inline] shmem_add_to_page_cache+0xb0a/0x2020 mm/shmem.c:719 shmem_get_folio_gfp+0xfe4/0x36e0 mm/shmem.c:1954 shmem_get_folio mm/shmem.c:2055 [inline] shmem_write_begin+0x133/0x480 mm/shmem.c:2542 generic_perform_write+0x2e4/0x5e0 mm/filemap.c:3753 __generic_file_write_iter+0x176/0x400 mm/filemap.c:3881 generic_file_write_iter+0xab/0x310 mm/filemap.c:3913 call_write_iter include/linux/fs.h:2186 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7dc/0xc50 fs/read_write.c:584 ksys_write+0x177/0x2a0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa3c403de5f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 99 fd ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 cc fd ff ff 48 RSP: 002b:00007fa3c4e02f10 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fa3c403de5f RDX: 0000000001000000 RSI: 00007fa3ba7ff000 RDI: 0000000000000003 RBP: 00007fa3ba7ff000 R08: 0000000000000000 R09: 00000000000055a2 R10: 0000000001000000 R11: 0000000000000293 R12: 0000000000000000 R13: 00007fa3c4e02fdc R14: 00007fa3c4e02fe0 R15: 0000000020005682