INFO: task kworker/u8:8:3472 blocked for more than 143 seconds. Not tainted 6.13.0-rc4-syzkaller-00069-g8379578b11d5 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u8:8 state:D stack:16944 pid:3472 tgid:3472 ppid:2 flags:0x00004000 Workqueue: writeback wb_workfn (flush-bcachefs-24) Call Trace: context_switch kernel/sched/core.c:5369 [inline] __schedule+0x17fb/0x4be0 kernel/sched/core.c:6756 __schedule_loop kernel/sched/core.c:6833 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6848 io_schedule+0x8d/0x110 kernel/sched/core.c:7681 folio_wait_bit_common+0x839/0xee0 mm/filemap.c:1308 folio_lock include/linux/pagemap.h:1151 [inline] writeback_get_folio mm/page-writeback.c:2515 [inline] writeback_iter+0x8ad/0x12b0 mm/page-writeback.c:2609 write_cache_pages+0xb1/0x230 mm/page-writeback.c:2658 bch2_writepages+0x156/0x390 fs/bcachefs/fs-io-buffered.c:639 do_writepages+0x35f/0x880 mm/page-writeback.c:2702 __writeback_single_inode+0x14f/0x10d0 fs/fs-writeback.c:1680 writeback_sb_inodes+0x820/0x1360 fs/fs-writeback.c:1976 __writeback_inodes_wb+0x11b/0x260 fs/fs-writeback.c:2047 wb_writeback+0x427/0xb80 fs/fs-writeback.c:2158 wb_check_background_flush fs/fs-writeback.c:2228 [inline] wb_do_writeback fs/fs-writeback.c:2316 [inline] wb_workfn+0xc4b/0x1080 fs/fs-writeback.c:2343 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 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.3.129:7174 blocked for more than 143 seconds. Not tainted 6.13.0-rc4-syzkaller-00069-g8379578b11d5 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.3.129 state:D stack:25200 pid:7174 tgid:7116 ppid:5827 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5369 [inline] __schedule+0x17fb/0x4be0 kernel/sched/core.c:6756 __schedule_loop kernel/sched/core.c:6833 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6848 io_schedule+0x8d/0x110 kernel/sched/core.c:7681 folio_wait_bit_common+0x839/0xee0 mm/filemap.c:1308 folio_wait_writeback+0xb0/0x100 mm/page-writeback.c:3194 truncate_inode_partial_folio+0x169/0x5e0 mm/truncate.c:192 truncate_inode_pages_range+0x6f3/0x10e0 mm/truncate.c:338 bchfs_fpunch+0x1c1/0x780 fs/bcachefs/fs-io.c:514 bch2_fallocate_dispatch+0x3e4/0x540 fs/bcachefs/fs-io.c:782 vfs_fallocate+0x569/0x6e0 fs/open.c:327 ksys_fallocate fs/open.c:351 [inline] __do_sys_fallocate fs/open.c:356 [inline] __se_sys_fallocate fs/open.c:354 [inline] __x64_sys_fallocate+0xbc/0x110 fs/open.c:354 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:0x7f5343985d29 RSP: 002b:00007f53447e1038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f5343b76080 RCX: 00007f5343985d29 RDX: 0000000000000001 RSI: 0000000000000003 RDI: 0000000000000005 RBP: 00007f5343a01b08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000002328 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f5343b76080 R15: 00007ffd963a1028 Showing all locks held in the system: 2 locks held by kworker/u8:1/12: #0: ffff888147e8c948 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline] #0: ffff888147e8c948 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3310 #1: ffffc90000117d00 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline] #1: ffffc90000117d00 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3310 1 lock held by khungtaskd/30: #0: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #0: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #0: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6744 3 locks held by kworker/1:1/51: 3 locks held by kworker/u8:4/67: 3 locks held by kworker/0:2/973: #0: ffff88801ac80948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline] #0: ffff88801ac80948 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3310 #1: ffffc90003c9fd00 (deferred_process_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline] #1: ffffc90003c9fd00 (deferred_process_work){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3310 #2: ffffffff8fca0788 (rtnl_mutex){+.+.}-{4:4}, at: switchdev_deferred_process_work+0xe/0x20 net/switchdev/switchdev.c:104 3 locks held by kworker/u8:7/3452: 3 locks held by kworker/u8:8/3472: #0: ffff888141290948 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline] #0: ffff888141290948 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3310 #1: ffffc9000cf2fd00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline] #1: ffffc9000cf2fd00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3310 #2: ffff888045a920e0 (&type->s_umount_key#70){++++}-{4:4}, at: super_trylock_shared+0x22/0xf0 fs/super.c:562 5 locks held by kworker/u8:9/3481: 3 locks held by kworker/u8:11/3579: 2 locks held by getty/5575: #0: ffff888030a7e0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243 #1: ffffc9000332b2f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x6a6/0x1e00 drivers/tty/n_tty.c:2211 3 locks held by kworker/1:4/5897: 2 locks held by syz.3.129/7119: #0: ffff888032866d38 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x254/0x320 fs/file.c:1191 #1: ffff888045a92420 (sb_writers#19){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2964 [inline] #1: ffff888045a92420 (sb_writers#19){.+.+}-{0:0}, at: vfs_write+0x225/0xd30 fs/read_write.c:675 2 locks held by syz.3.129/7174: #0: ffff888045a92420 (sb_writers#19){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2964 [inline] #0: ffff888045a92420 (sb_writers#19){.+.+}-{0:0}, at: vfs_fallocate+0x4fe/0x6e0 fs/open.c:326 #1: ffff88805fa317c8 (&sb->s_type->i_mutex_key#27){++++}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] #1: ffff88805fa317c8 (&sb->s_type->i_mutex_key#27){++++}-{4:4}, at: bch2_fallocate_dispatch+0x1e2/0x540 fs/bcachefs/fs-io.c:771 5 locks held by syz.1.370/9306: #0: ffff888031358420 (sb_writers#19){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:515 #1: ffff88805fa35b48 (&sb->s_type->i_mutex_key#27){++++}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] #1: ffff88805fa35b48 (&sb->s_type->i_mutex_key#27){++++}-{4:4}, at: do_truncate+0x20c/0x310 fs/open.c:63 #2: ffff88806da80a38 (&c->snapshot_create_lock){.+.+}-{4:4}, at: bch2_truncate+0x166/0x2d0 fs/bcachefs/io_misc.c:292 #3: ffff88806da84398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:158 [inline] #3: ffff88806da84398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:249 [inline] #3: ffff88806da84398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7e1/0xd30 fs/bcachefs/btree_iter.c:3228 #4: ffff88806daa66d0 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x682/0x14e0 fs/bcachefs/btree_update_interior.c:1197 3 locks held by syz-executor/9619: 2 locks held by syz.8.399/9689: #0: ffff888045a920e0 (&type->s_umount_key#70){++++}-{4:4}, at: __super_lock fs/super.c:58 [inline] #0: ffff888045a920e0 (&type->s_umount_key#70){++++}-{4:4}, at: super_lock+0x27c/0x400 fs/super.c:120 #1: ffff888045a907d0 (&bdi->wb_switch_rwsem){+.+.}-{4:4}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:387 [inline] #1: ffff888045a907d0 (&bdi->wb_switch_rwsem){+.+.}-{4:4}, at: sync_inodes_sb+0x26e/0xb50 fs/fs-writeback.c:2819 2 locks held by syz.8.399/9694: #0: ffff888045a920e0 (&type->s_umount_key#70){++++}-{4:4}, at: __super_lock fs/super.c:58 [inline] #0: ffff888045a920e0 (&type->s_umount_key#70){++++}-{4:4}, at: super_lock+0x27c/0x400 fs/super.c:120 #1: ffff888045a907d0 (&bdi->wb_switch_rwsem){+.+.}-{4:4}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:387 [inline] #1: ffff888045a907d0 (&bdi->wb_switch_rwsem){+.+.}-{4:4}, at: sync_inodes_sb+0x26e/0xb50 fs/fs-writeback.c:2819 2 locks held by syz.8.399/9695: #0: ffff888045a920e0 (&type->s_umount_key#70){++++}-{4:4}, at: __super_lock fs/super.c:58 [inline] #0: ffff888045a920e0 (&type->s_umount_key#70){++++}-{4:4}, at: super_lock+0x27c/0x400 fs/super.c:120 #1: ffff888045a907d0 (&bdi->wb_switch_rwsem){+.+.}-{4:4}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:387 [inline] #1: ffff888045a907d0 (&bdi->wb_switch_rwsem){+.+.}-{4:4}, at: sync_inodes_sb+0x26e/0xb50 fs/fs-writeback.c:2819 2 locks held by syz.8.399/9697: #0: ffff888045a920e0 (&type->s_umount_key#70){++++}-{4:4}, at: __super_lock fs/super.c:58 [inline] #0: ffff888045a920e0 (&type->s_umount_key#70){++++}-{4:4}, at: super_lock+0x27c/0x400 fs/super.c:120 #1: ffff888045a907d0 (&bdi->wb_switch_rwsem){+.+.}-{4:4}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:387 [inline] #1: ffff888045a907d0 (&bdi->wb_switch_rwsem){+.+.}-{4:4}, at: sync_inodes_sb+0x26e/0xb50 fs/fs-writeback.c:2819 7 locks held by syz-executor/9730: #0: ffff888035900420 (sb_writers#8){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2964 [inline] #0: ffff888035900420 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x225/0xd30 fs/read_write.c:675 #1: ffff888060556c88 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1ea/0x500 fs/kernfs/file.c:325 #2: ffff8881447bf968 (kn->active#49){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x20e/0x500 fs/kernfs/file.c:326 #3: ffffffff8f54c3e8 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: del_device_store+0xfc/0x480 drivers/net/netdevsim/bus.c:216 #4: ffff8880463ae0e8 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1014 [inline] #4: ffff8880463ae0e8 (&dev->mutex){....}-{4:4}, at: __device_driver_lock drivers/base/dd.c:1095 [inline] #4: ffff8880463ae0e8 (&dev->mutex){....}-{4:4}, at: device_release_driver_internal+0xce/0x7c0 drivers/base/dd.c:1293 #5: ffff8880463a9250 (&devlink->lock_key#11){+.+.}-{4:4}, at: nsim_drv_remove+0x50/0x160 drivers/net/netdevsim/dev.c:1675 #6: ffffffff8e93cec0 (rcu_state.barrier_mutex){+.+.}-{4:4}, at: rcu_barrier+0x4c/0x530 kernel/rcu/tree.c:4565 2 locks held by syz.3.414/9763: 1 lock held by modprobe/9766: ============================================= NMI backtrace for cpu 1 CPU: 1 UID: 0 PID: 30 Comm: khungtaskd Not tainted 6.13.0-rc4-syzkaller-00069-g8379578b11d5 #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:234 [inline] watchdog+0xff6/0x1040 kernel/hung_task.c:397 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 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 UID: 0 PID: 973 Comm: kworker/0:2 Not tainted 6.13.0-rc4-syzkaller-00069-g8379578b11d5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: events_power_efficient neigh_periodic_work RIP: 0010:hlock_class kernel/locking/lockdep.c:223 [inline] RIP: 0010:mark_lock+0x61/0x360 kernel/locking/lockdep.c:4727 Code: 85 94 02 00 00 31 ed f6 43 02 03 40 0f 94 c5 83 f5 09 eb 0b 89 d5 83 fa 20 0f 83 e3 02 00 00 41 be 01 00 00 00 89 e9 41 d3 e6 <49> 8d 5f 20 48 89 d8 48 c1 e8 03 42 0f b6 04 28 84 c0 0f 85 3a 02 RSP: 0018:ffffc90003c9f888 EFLAGS: 00000002 RAX: 00000000000406ae RBX: 1ffff11004c6d52f RCX: 0000000000000002 RDX: 0000000000000002 RSI: ffff88802636a958 RDI: ffff888026369e00 RBP: 0000000000000002 R08: ffffffff942708c7 R09: 1ffffffff284e118 R10: dffffc0000000000 R11: fffffbfff284e119 R12: ffff88802636a8c4 R13: dffffc0000000000 R14: 0000000000000004 R15: ffff88802636a958 FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f00bbd59270 CR3: 0000000035446000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: mark_usage kernel/locking/lockdep.c:4658 [inline] __lock_acquire+0x117d/0x2100 kernel/locking/lockdep.c:5180 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __raw_write_lock include/linux/rwlock_api_smp.h:209 [inline] _raw_write_lock+0x2e/0x40 kernel/locking/spinlock.c:300 neigh_periodic_work+0x403/0xde0 net/core/neighbour.c:938 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 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