INFO: task syz.0.255:7416 blocked for more than 143 seconds. Not tainted 6.11.0-syzkaller-11728-gad46e8f95e93 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.0.255 state:D stack:27424 pid:7416 tgid:7378 ppid:6747 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5315 [inline] __schedule+0x1843/0x4ae0 kernel/sched/core.c:6675 __schedule_loop kernel/sched/core.c:6752 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6767 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6824 __mutex_lock_common kernel/locking/mutex.c:684 [inline] __mutex_lock+0x6a7/0xd70 kernel/locking/mutex.c:752 fdget_pos+0x24e/0x320 fs/file.c:1187 ksys_write+0x7e/0x2b0 fs/read_write.c:727 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd91ad7dff9 RSP: 002b:00007fd91bbb6038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fd91af36058 RCX: 00007fd91ad7dff9 RDX: 0000000000000118 RSI: 0000000020000280 RDI: 000000000000000a RBP: 00007fd91adf0296 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007fd91af36058 R15: 00007fff598d9878 Showing all locks held in the system: 2 locks held by kworker/u8:1/12: 1 lock held by khungtaskd/30: #0: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #0: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #0: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6701 3 locks held by kworker/u8:3/52: 2 locks held by getty/4975: #0: ffff88803339a0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243 #1: ffffc90002f062f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a6/0x1e00 drivers/tty/n_tty.c:2211 1 lock held by syz-executor/7375: #0: ffffffff8e93d338 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:329 [inline] #0: ffffffff8e93d338 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x451/0x830 kernel/rcu/tree_exp.h:976 2 locks held by syz.0.255/7379: #0: ffff888069a770b8 (&f->f_pos_lock){+.+.}-{3:3}, at: fdget_pos+0x24e/0x320 fs/file.c:1187 #1: ffff88807e834420 (sb_writers#34){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2931 [inline] #1: ffff88807e834420 (sb_writers#34){.+.+}-{0:0}, at: vfs_write+0x224/0xc90 fs/read_write.c:679 1 lock held by syz.0.255/7416: #0: ffff888069a770b8 (&f->f_pos_lock){+.+.}-{3:3}, at: fdget_pos+0x24e/0x320 fs/file.c:1187 2 locks held by bch-copygc/loop/7410: 1 lock held by syz-executor/8097: #0: ffffffff8e93d338 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:329 [inline] #0: ffffffff8e93d338 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x451/0x830 kernel/rcu/tree_exp.h:976 2 locks held by syz.0.409/8360: #0: ffff88807e8340e0 (&type->s_umount_key#116){++++}-{3:3}, at: __super_lock fs/super.c:58 [inline] #0: ffff88807e8340e0 (&type->s_umount_key#116){++++}-{3:3}, at: super_lock+0x27c/0x400 fs/super.c:120 #1: ffff88807e834938 (&s->s_sync_lock){+.+.}-{3:3}, at: wait_sb_inodes fs/fs-writeback.c:2619 [inline] #1: ffff88807e834938 (&s->s_sync_lock){+.+.}-{3:3}, at: sync_inodes_sb+0x32e/0xb50 fs/fs-writeback.c:2802 2 locks held by syz.1.479/8748: #0: ffff88807e8340e0 (&type->s_umount_key#116){++++}-{3:3}, at: __super_lock fs/super.c:58 [inline] #0: ffff88807e8340e0 (&type->s_umount_key#116){++++}-{3:3}, at: super_lock+0x27c/0x400 fs/super.c:120 #1: ffff88807e834938 (&s->s_sync_lock){+.+.}-{3:3}, at: wait_sb_inodes fs/fs-writeback.c:2619 [inline] #1: ffff88807e834938 (&s->s_sync_lock){+.+.}-{3:3}, at: sync_inodes_sb+0x32e/0xb50 fs/fs-writeback.c:2802 7 locks held by syz-executor/8861: #0: ffff88802d64e420 (sb_writers#8){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2931 [inline] #0: ffff88802d64e420 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x224/0xc90 fs/read_write.c:679 #1: ffff88802e9f7088 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x1ea/0x500 fs/kernfs/file.c:325 #2: ffff8880272d4a58 (kn->active#49){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x20e/0x500 fs/kernfs/file.c:326 #3: ffffffff8f55cfc8 (nsim_bus_dev_list_lock){+.+.}-{3:3}, at: del_device_store+0xfc/0x480 drivers/net/netdevsim/bus.c:216 #4: ffff8880651f40e8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:1014 [inline] #4: ffff8880651f40e8 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1095 [inline] #4: ffff8880651f40e8 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xce/0x7c0 drivers/base/dd.c:1293 #5: ffff888028d02250 (&devlink->lock_key#14){+.+.}-{3:3}, at: nsim_drv_remove+0x50/0x160 drivers/net/netdevsim/dev.c:1672 #6: ffffffff8fcbef48 (rtnl_mutex){+.+.}-{3:3}, at: nsim_destroy+0x71/0x5c0 drivers/net/netdevsim/netdev.c:773 5 locks held by syz.3.516/8918: 3 locks held by syz.0.517/8920: #0: ffff88807e8340e0 (&type->s_umount_key#116){++++}-{3:3}, at: __super_lock fs/super.c:58 [inline] #0: ffff88807e8340e0 (&type->s_umount_key#116){++++}-{3:3}, at: super_lock+0x27c/0x400 fs/super.c:120 #1: ffff88806a404398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:151 [inline] #1: ffff88806a404398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:250 [inline] #1: ffff88806a404398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7de/0xd20 fs/bcachefs/btree_iter.c:3215 #2: ffff88806a4266d0 (&c->gc_lock){++++}-{3:3}, at: bch2_btree_update_start+0x682/0x14e0 fs/bcachefs/btree_update_interior.c:1202 1 lock held by syz.0.517/8921: ============================================= NMI backtrace for cpu 0 CPU: 0 UID: 0 PID: 30 Comm: khungtaskd Not tainted 6.11.0-syzkaller-11728-gad46e8f95e93 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 nmi_cpu_backtrace+0x49c/0x4d0 lib/nmi_backtrace.c:113 nmi_trigger_cpumask_backtrace+0x198/0x320 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:162 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:223 [inline] watchdog+0xff4/0x1040 kernel/hung_task.c:379 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 UID: 0 PID: 7375 Comm: syz-executor Not tainted 6.11.0-syzkaller-11728-gad46e8f95e93 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:debug_spin_unlock kernel/locking/spinlock_debug.c:103 [inline] RIP: 0010:do_raw_spin_unlock+0xcd/0x8b0 kernel/locking/spinlock_debug.c:141 Code: 8d 77 08 4c 89 f3 48 c1 eb 03 48 b8 00 00 00 00 00 fc ff df 0f b6 04 03 84 c0 0f 85 f0 03 00 00 41 8b 06 65 8b 0d 7f 58 92 7e <39> c8 0f 85 cb 02 00 00 48 bd 00 00 00 00 00 fc ff df 41 80 3c 2c RSP: 0018:ffffc90000a18960 EFLAGS: 00000046 RAX: 0000000000000001 RBX: 1ffffffff1d42b2d RCX: 0000000000000001 RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffffffff8ea15960 RBP: ffff888061060000 R08: ffffffff8ea15963 R09: 1ffffffff1d42b2c R10: dffffc0000000000 R11: fffffbfff1d42b2d R12: 1ffffffff1d42b2e R13: ffffffff8ea15970 R14: ffffffff8ea15968 R15: ffffffff8ea15960 FS: 000055555f23d500(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd93b3ed38 CR3: 0000000069538000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:150 [inline] _raw_spin_unlock_irqrestore+0x81/0x140 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] free_percpu+0xb34/0x1150 mm/percpu.c:2272 fib6_nh_release+0x3cd/0x420 net/ipv6/route.c:3666 fib6_info_destroy_rcu+0xc0/0x1b0 net/ipv6/ip6_fib.c:177 rcu_do_batch kernel/rcu/tree.c:2567 [inline] rcu_core+0xaaa/0x17a0 kernel/rcu/tree.c:2823 handle_softirqs+0x2c5/0x980 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1037 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1037 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:lock_acquire+0x264/0x550 kernel/locking/lockdep.c:5826 Code: 2b 00 74 08 4c 89 f7 e8 aa 2c 8b 00 f6 44 24 61 02 0f 85 85 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25 RSP: 0018:ffffc90004427800 EFLAGS: 00000206 RAX: 0000000000000001 RBX: 1ffff92000884f0c RCX: 73388677181a4400 RDX: dffffc0000000000 RSI: ffffffff8c0adb40 RDI: ffffffff8c601fe0 RBP: ffffc90004427950 R08: ffffffff96adf417 R09: 1ffffffff2d5be82 R10: dffffc0000000000 R11: fffffbfff2d5be83 R12: 1ffff92000884f08 R13: dffffc0000000000 R14: ffffc90004427860 R15: 0000000000000246 touch_wq_lockdep_map+0xc7/0x170 kernel/workqueue.c:3880 __flush_workqueue+0x14f/0x1600 kernel/workqueue.c:3922 close_ctree+0x2e0/0xd20 fs/btrfs/disk-io.c:4278 generic_shutdown_super+0x139/0x2d0 fs/super.c:642 kill_anon_super+0x3b/0x70 fs/super.c:1237 btrfs_kill_super+0x41/0x50 fs/btrfs/super.c:2121 deactivate_locked_super+0xc4/0x130 fs/super.c:473 cleanup_mnt+0x41f/0x4b0 fs/namespace.c:1373 task_work_run+0x24f/0x310 kernel/task_work.c:228 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x168/0x370 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f58bdf7f327 Code: a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffd93b3f4e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f58bdf7f327 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffd93b3f5a0 RBP: 00007ffd93b3f5a0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffd93b40620 R13: 00007f58bdff0134 R14: 00000000000510d7 R15: 00007ffd93b40660