INFO: task kworker/1:6:5159 blocked for more than 143 seconds. Not tainted 6.10.0-syzkaller-01193-g408323581b72 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/1:6 state:D stack:19920 pid:5159 tgid:5159 ppid:2 flags:0x00004000 Workqueue: events_long bch2_fs_read_only_work Call Trace: context_switch kernel/sched/core.c:5407 [inline] __schedule+0x1800/0x4a60 kernel/sched/core.c:6748 __schedule_loop kernel/sched/core.c:6825 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6840 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6897 rwsem_down_write_slowpath+0xeeb/0x13b0 kernel/locking/rwsem.c:1178 __down_write_common+0x1af/0x200 kernel/locking/rwsem.c:1306 bch2_fs_read_only_work+0x25/0x40 fs/bcachefs/super.c:392 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2e/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd40 kernel/workqueue.c:3390 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 INFO: task syz.3.863:9154 blocked for more than 144 seconds. Not tainted 6.10.0-syzkaller-01193-g408323581b72 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.3.863 state:D stack:24408 pid:9154 tgid:9095 ppid:5091 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5407 [inline] __schedule+0x1800/0x4a60 kernel/sched/core.c:6748 __schedule_loop kernel/sched/core.c:6825 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6840 __closure_sync+0x259/0x2f0 lib/closure.c:146 closure_sync include/linux/closure.h:195 [inline] bch2_dev_allocator_remove+0x4f3/0x870 fs/bcachefs/alloc_background.c:2405 __bch2_dev_read_only fs/bcachefs/super.c:1536 [inline] bch2_dev_remove+0x1f9/0x1660 fs/bcachefs/super.c:1643 bch2_ioctl_disk_remove+0x85/0xa0 fs/bcachefs/chardev.c:347 bch2_fs_ioctl+0x1b7c/0x37d0 fs/bcachefs/chardev.c:916 bch2_fs_file_ioctl+0x870/0x26d0 fs/bcachefs/fs-ioctl.c:532 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xfe/0x170 fs/ioctl.c:893 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:0x7fcc3fd75a19 RSP: 002b:00007fcc40bd8048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fcc3ff04110 RCX: 00007fcc3fd75a19 RDX: 0000000020000240 RSI: 000000004010bc05 RDI: 0000000000000004 RBP: 00007fcc3fde4e49 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007fcc3ff04110 R15: 00007ffcad02f0f8 Showing all locks held in the system: 1 lock held by ksoftirqd/1/24: #0: ffff8880b943e798 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0xb0/0x140 kernel/sched/core.c:567 1 lock held by khungtaskd/30: #0: ffffffff8e333fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #0: ffffffff8e333fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #0: ffffffff8e333fe0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6614 3 locks held by kworker/1:1/46: #0: ffff888015078948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff888015078948 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc90000b67d00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc90000b67d00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffffffff8f5ec488 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xe/0x60 net/core/link_watch.c:276 3 locks held by kworker/1:2/58: #0: ffff888015078948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff888015078948 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc900013c7d00 (key_gc_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc900013c7d00 (key_gc_work){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffffffff8e3393b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:296 [inline] #2: ffffffff8e3393b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x381/0x830 kernel/rcu/tree_exp.h:958 2 locks held by getty/4852: #0: ffff88802a7660a0 (&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+0x6b5/0x1e10 drivers/tty/n_tty.c:2211 1 lock held by syz-executor/5092: 3 locks held by kworker/1:3/5096: #0: ffff88801caae548 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff88801caae548 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc900031dfd00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc900031dfd00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffff8880236bd218 (&dev->power.lock){-.-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] #2: ffff8880236bd218 (&dev->power.lock){-.-.}-{2:2}, at: rpm_idle+0x5c8/0x930 drivers/base/power/runtime.c:529 3 locks held by kworker/1:6/5159: #0: ffff888015079148 ((wq_completion)events_long){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff888015079148 ((wq_completion)events_long){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc900033cfd00 ((work_completion)(&c->read_only_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc900033cfd00 ((work_completion)(&c->read_only_work)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffff888055500278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_read_only_work+0x25/0x40 fs/bcachefs/super.c:392 1 lock held by syz.3.863/9154: #0: ffff888055500278 (&c->state_lock){+.+.}-{3:3}, at: bch2_dev_remove+0xe4/0x1660 fs/bcachefs/super.c:1629 4 locks held by kworker/0:1/11020: #0: ffff88801caae548 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3206 [inline] #0: ffff88801caae548 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3312 #1: ffffc900090b7d00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3207 [inline] #1: ffffc900090b7d00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3312 #2: ffff88823bc92990 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:1009 [inline] #2: ffff88823bc92990 (&dev->mutex){....}-{3:3}, at: hub_event+0x1fe/0x5150 drivers/usb/core/hub.c:5849 #3: ffff8880122df190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:1009 [inline] #3: ffff8880122df190 (&dev->mutex){....}-{3:3}, at: __device_attach+0x8e/0x520 drivers/base/dd.c:1003 8 locks held by syz-executor/11327: #0: ffff88802a1b8420 (sb_writers#8){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2876 [inline] #0: ffff88802a1b8420 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x227/0xc90 fs/read_write.c:586 #1: ffff888061e3c488 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x1eb/0x500 fs/kernfs/file.c:325 #2: ffff888021e28698 (kn->active#49){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x20f/0x500 fs/kernfs/file.c:326 #3: ffffffff8eef9768 (nsim_bus_dev_list_lock){+.+.}-{3:3}, at: del_device_store+0xfc/0x480 drivers/net/netdevsim/bus.c:216 #4: ffff888029cfb0e8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:1009 [inline] #4: ffff888029cfb0e8 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1093 [inline] #4: ffff888029cfb0e8 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xce/0x7c0 drivers/base/dd.c:1290 #5: ffff888029cff250 (&devlink->lock_key#8){+.+.}-{3:3}, at: nsim_drv_remove+0x50/0x160 drivers/net/netdevsim/dev.c:1672 #6: ffffffff8f5ec488 (rtnl_mutex){+.+.}-{3:3}, at: nsim_destroy+0x71/0x5c0 drivers/net/netdevsim/netdev.c:773 #7: ffffffff8e3393b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:328 [inline] #7: ffffffff8e3393b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x451/0x830 kernel/rcu/tree_exp.h:958 1 lock held by syz.4.1488/11520: #0: ffffffff8f5ec488 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #0: ffffffff8f5ec488 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x842/0x1180 net/core/rtnetlink.c:6632 1 lock held by syz.0.1494/11518: #0: ffffffff8f5ec488 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #0: ffffffff8f5ec488 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x842/0x1180 net/core/rtnetlink.c:6632 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 30 Comm: khungtaskd Not tainted 6.10.0-syzkaller-01193-g408323581b72 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 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+0xfde/0x1020 kernel/hung_task.c:379 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/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 skipped: idling at native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline] NMI backtrace for cpu 1 skipped: idling at arch_safe_halt arch/x86/include/asm/irqflags.h:106 [inline] NMI backtrace for cpu 1 skipped: idling at acpi_safe_halt+0x21/0x30 drivers/acpi/processor_idle.c:111