INFO: task kworker/0:5:5168 blocked for more than 143 seconds. Not tainted 6.10.0-rc7-syzkaller-00266-g4d145e3f830b #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/0:5 state:D stack:23128 pid:5168 tgid:5168 ppid:2 flags:0x00004000 Workqueue: events_long bch2_fs_read_only_work Call Trace: context_switch kernel/sched/core.c:5408 [inline] __schedule+0x1796/0x49d0 kernel/sched/core.c:6745 __schedule_loop kernel/sched/core.c:6822 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6837 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6894 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:3248 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3329 worker_thread+0x86d/0xd50 kernel/workqueue.c:3409 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 INFO: task syz.0.372:9004 blocked for more than 143 seconds. Not tainted 6.10.0-rc7-syzkaller-00266-g4d145e3f830b #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.0.372 state:D stack:21656 pid:9004 tgid:8973 ppid:8645 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5408 [inline] __schedule+0x1796/0x49d0 kernel/sched/core.c:6745 __schedule_loop kernel/sched/core.c:6822 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6837 __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/0x26e0 fs/bcachefs/fs-ioctl.c:532 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xfc/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:0x7fa102175bd9 RSP: 002b:00007fa102ee8048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fa102304038 RCX: 00007fa102175bd9 RDX: 0000000020000240 RSI: 000000004010bc05 RDI: 0000000000000004 RBP: 00007fa1021e4e60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007fa102304038 R15: 00007ffdc1e427c8 Showing all locks held in the system: 6 locks held by kworker/u8:1/12: 1 lock held by khungtaskd/30: #0: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #0: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #0: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6614 3 locks held by kworker/u8:2/35: 2 locks held by kworker/u8:4/62: #0: ffff8880b953e758 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 #1: ffff8880b9528948 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x441/0x770 kernel/sched/psi.c:988 4 locks held by udevd/4533: #0: ffff888067c2b668 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xb7/0xd60 fs/seq_file.c:182 #1: ffff88804f6ea488 (&of->mutex#2){+.+.}-{3:3}, at: kernfs_seq_start+0x53/0x3b0 fs/kernfs/file.c:154 #2: ffff8880790ef788 (kn->active#5){++++}-{0:0}, at: kernfs_seq_start+0x72/0x3b0 fs/kernfs/file.c:155 #3: ffff8880120f20e8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:1009 [inline] #3: ffff8880120f20e8 (&dev->mutex){....}-{3:3}, at: uevent_show+0x17d/0x340 drivers/base/core.c:2743 1 lock held by dhcpcd/4747: #0: ffffffff8f5d82c8 (rtnl_mutex){+.+.}-{3:3}, at: devinet_ioctl+0x2ce/0x1bc0 net/ipv4/devinet.c:1101 2 locks held by getty/4837: #0: ffff88802ae8d0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243 #1: ffffc90002f162f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6b5/0x1e10 drivers/tty/n_tty.c:2211 3 locks held by kworker/1:5/5138: #0: ffff888015080948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3223 [inline] #0: ffff888015080948 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3329 #1: ffffc90004497d00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3224 [inline] #1: ffffc90004497d00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3329 #2: ffffffff8f5d82c8 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xe/0x60 net/core/link_watch.c:276 3 locks held by kworker/0:5/5168: #0: ffff888015081148 ((wq_completion)events_long){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3223 [inline] #0: ffff888015081148 ((wq_completion)events_long){+.+.}-{0:0}, at: process_scheduled_works+0x90a/0x1830 kernel/workqueue.c:3329 #1: ffffc900045f7d00 ((work_completion)(&c->read_only_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3224 [inline] #1: ffffc900045f7d00 ((work_completion)(&c->read_only_work)){+.+.}-{0:0}, at: process_scheduled_works+0x945/0x1830 kernel/workqueue.c:3329 #2: ffff888057380278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_read_only_work+0x25/0x40 fs/bcachefs/super.c:392 18 locks held by syz-executor/7663: 1 lock held by syz.0.372/9004: #0: ffff888057380278 (&c->state_lock){+.+.}-{3:3}, at: bch2_dev_remove+0xe4/0x1660 fs/bcachefs/super.c:1629 1 lock held by syz.1.483/9812: 1 lock held by syz.1.483/9813: #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:801 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: open_last_lookups fs/namei.c:3573 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: path_openat+0x7da/0x35f0 fs/namei.c:3810 1 lock held by syz.1.483/9814: #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: open_last_lookups fs/namei.c:3571 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: path_openat+0x7e9/0x35f0 fs/namei.c:3810 1 lock held by syz.1.483/9815: #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: open_last_lookups fs/namei.c:3571 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: path_openat+0x7e9/0x35f0 fs/namei.c:3810 1 lock held by syz.1.483/9816: #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:826 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23/1){+.+.}-{3:3}, at: filename_create+0x260/0x540 fs/namei.c:3906 1 lock held by syz.1.483/9817: #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:826 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23/1){+.+.}-{3:3}, at: filename_create+0x260/0x540 fs/namei.c:3906 1 lock held by syz.1.483/9818: #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:801 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: open_last_lookups fs/namei.c:3573 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: path_openat+0x7da/0x35f0 fs/namei.c:3810 1 lock held by syz.1.483/9819: #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:801 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: open_last_lookups fs/namei.c:3573 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: path_openat+0x7da/0x35f0 fs/namei.c:3810 1 lock held by syz.1.483/9820: #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:801 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23){++++}-{3:3}, at: lookup_slow+0x45/0x70 fs/namei.c:1708 1 lock held by syz.1.483/9821: #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:826 [inline] #0: ffff8880607c06d0 (&type->i_mutex_dir_key#23/1){+.+.}-{3:3}, at: filename_create+0x260/0x540 fs/namei.c:3906 7 locks held by syz-executor/10097: #0: ffff88807d142420 (sb_writers#8){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2854 [inline] #0: ffff88807d142420 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x227/0xc90 fs/read_write.c:586 #1: ffff88804f6ee488 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x1eb/0x500 fs/kernfs/file.c:325 #2: ffff88801e9c4008 (kn->active#50){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x20f/0x500 fs/kernfs/file.c:326 #3: ffffffff8eee5908 (nsim_bus_dev_list_lock){+.+.}-{3:3}, at: new_device_store+0x1b4/0x890 drivers/net/netdevsim/bus.c:166 #4: ffff8880120f20e8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:1009 [inline] #4: ffff8880120f20e8 (&dev->mutex){....}-{3:3}, at: __device_attach+0x8e/0x520 drivers/base/dd.c:1003 #5: ffff8880120f1250 (&devlink->lock_key#37){+.+.}-{3:3}, at: nsim_drv_probe+0xcb/0xb80 drivers/net/netdevsim/dev.c:1534 #6: ffffffff8f5d82c8 (rtnl_mutex){+.+.}-{3:3}, at: register_nexthop_notifier+0x84/0x290 net/ipv4/nexthop.c:3871 1 lock held by syz-executor/10148: #0: ffffffff8f5d82c8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #0: ffffffff8f5d82c8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x842/0x1180 net/core/rtnetlink.c:6632 1 lock held by syz-executor/10152: #0: ffffffff8f5d82c8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #0: ffffffff8f5d82c8 (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-rc7-syzkaller-00266-g4d145e3f830b #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+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 PID: 25 Comm: kworker/1:0 Not tainted 6.10.0-rc7-syzkaller-00266-g4d145e3f830b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Workqueue: events_power_efficient wg_ratelimiter_gc_entries RIP: 0010:__lock_is_held kernel/locking/lockdep.c:5492 [inline] RIP: 0010:lock_is_held_type+0xb0/0x190 kernel/locking/lockdep.c:5825 Code: 0a 00 00 00 7e 47 4c 89 eb 48 81 c3 e0 0a 00 00 31 ed 48 83 fd 31 73 24 48 89 df 4c 89 fe e8 67 02 00 00 85 c0 75 2a 48 ff c5 <49> 63 85 d8 0a 00 00 48 83 c3 28 48 39 c5 7c d8 eb 11 48 c7 c7 60 RSP: 0018:ffffc900001f79f8 EFLAGS: 00000002 RAX: 0000000000000000 RBX: ffff8880176ea908 RCX: ffff8880176e9e00 RDX: 0000000000000000 RSI: ffffffff8e333f80 RDI: ffff8880176ea908 RBP: 0000000000000002 R08: ffffffff8edc7663 R09: 1ffffffff1db8ecc R10: dffffc0000000000 R11: fffffbfff1db8ecd R12: 0000000000000246 R13: ffff8880176e9e00 R14: 00000000ffffffff R15: ffffffff8e333f80 FS: 0000000000000000(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f0046ad1178 CR3: 000000001d39c000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: lock_is_held include/linux/lockdep.h:231 [inline] __might_resched+0xa5/0x780 kernel/sched/core.c:10158 wg_ratelimiter_gc_entries+0x3cd/0x470 drivers/net/wireguard/ratelimiter.c:78 process_one_work kernel/workqueue.c:3248 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3329 worker_thread+0x86d/0xd50 kernel/workqueue.c:3409 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