INFO: task syz.0.42:5548 blocked for more than 143 seconds. Not tainted 6.11.0-next-20240927-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.0.42 state:D stack:27392 pid:5548 tgid:5499 ppid:5235 flags:0x00004006 Call Trace: context_switch kernel/sched/core.c:5315 [inline] __schedule+0x1895/0x4b30 kernel/sched/core.c:6675 __schedule_loop kernel/sched/core.c:6752 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6767 __bch2_two_state_lock+0x229/0x2c0 fs/bcachefs/two_state_shared_lock.c:7 bch2_two_state_lock fs/bcachefs/two_state_shared_lock.h:55 [inline] bch2_read_iter+0x235/0x1470 fs/bcachefs/fs-io-direct.c:207 new_sync_read fs/read_write.c:488 [inline] vfs_read+0x9bb/0xbc0 fs/read_write.c:569 ksys_read+0x183/0x2b0 fs/read_write.c:712 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:0x7fd47d57dff9 RSP: 002b:00007fd47e3ba038 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007fd47d736058 RCX: 00007fd47d57dff9 RDX: 0000000000002020 RSI: 0000000020005b80 RDI: 0000000000000005 RBP: 00007fd47d5f0296 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fd47d736058 R15: 00007ffe64fa81e8 INFO: task syz.0.42:5550 blocked for more than 145 seconds. Not tainted 6.11.0-next-20240927-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.0.42 state:D stack:21200 pid:5550 tgid:5499 ppid:5235 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:5315 [inline] __schedule+0x1895/0x4b30 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 rwsem_down_write_slowpath+0xeee/0x13b0 kernel/locking/rwsem.c:1176 __down_write_common kernel/locking/rwsem.c:1304 [inline] __down_write kernel/locking/rwsem.c:1313 [inline] down_write+0x1d7/0x220 kernel/locking/rwsem.c:1578 inode_lock include/linux/fs.h:815 [inline] do_truncate fs/open.c:63 [inline] do_ftruncate+0x44e/0x580 fs/open.c:181 do_sys_ftruncate fs/open.c:199 [inline] __do_sys_ftruncate fs/open.c:207 [inline] __se_sys_ftruncate fs/open.c:205 [inline] __x64_sys_ftruncate+0x95/0xf0 fs/open.c:205 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:0x7fd47d57dff9 RSP: 002b:00007fd47e399038 EFLAGS: 00000246 ORIG_RAX: 000000000000004d RAX: ffffffffffffffda RBX: 00007fd47d736130 RCX: 00007fd47d57dff9 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000005 RBP: 00007fd47d5f0296 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fd47d736130 R15: 00007ffe64fa81e8 Showing all locks held in the system: 3 locks held by kworker/0:0/8: 1 lock held by khungtaskd/30: #0: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #0: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #0: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6720 4 locks held by kworker/u8:2/35: #0: ffff8880b863ea98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0xb0/0x140 kernel/sched/core.c:601 #1: ffff8880b8728948 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x441/0x770 kernel/sched/psi.c:989 #2: ffff8880727f0768 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: wiphy_lock include/net/cfg80211.h:6014 [inline] #2: ffff8880727f0768 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: cfg80211_wiphy_work+0xd9/0x490 net/wireless/core.c:426 #3: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #3: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #3: ffffffff8e937de0 (rcu_read_lock){....}-{1:2}, at: ieee80211_sta_active_ibss+0xc7/0x330 net/mac80211/ibss.c:642 2 locks held by jfsCommit/112: #0: ffff8880590e8920 (&(imap->im_aglock[index])){+.+.}-{3:3}, at: diFree+0x37c/0x2fb0 fs/jfs/jfs_imap.c:889 #1: ffff88806013af50 (&jfs_ip->rdwrlock/1){.+.+}-{3:3}, at: diFree+0x398/0x2fb0 fs/jfs/jfs_imap.c:894 5 locks held by kworker/u8:6/1307: #0: ffff88801baed948 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline] #0: ffff88801baed948 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1850 kernel/workqueue.c:3310 #1: ffffc9000455fd00 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline] #1: ffffc9000455fd00 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1850 kernel/workqueue.c:3310 #2: ffffffff8fcc6810 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0x16a/0xcc0 net/core/net_namespace.c:580 #3: ffffffff8fcd3308 (rtnl_mutex){+.+.}-{3:3}, at: default_device_exit_batch+0xe9/0xaa0 net/core/dev.c:11930 #4: ffffffff8e93d378 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:329 [inline] #4: ffffffff8e93d378 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x451/0x830 kernel/rcu/tree_exp.h:976 3 locks held by kworker/u8:7/2987: 3 locks held by kworker/u8:9/3037: #0: ffff88801ac89148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline] #0: ffff88801ac89148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1850 kernel/workqueue.c:3310 #1: ffffc9000a407d00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline] #1: ffffc9000a407d00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1850 kernel/workqueue.c:3310 #2: ffffffff8fcd3308 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xe/0x60 net/core/link_watch.c:276 1 lock held by dhcpcd/4902: #0: ffffffff8fcd3308 (rtnl_mutex){+.+.}-{3:3}, at: devinet_ioctl+0x2ce/0x1aa0 net/ipv4/devinet.c:1097 2 locks held by getty/4991: #0: ffff8880325b20a0 (&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 5 locks held by kworker/1:4/5284: #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/0x1850 kernel/workqueue.c:3310 #1: ffffc90004277d00 ((work_completion)(&fw_work->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline] #1: ffffc90004277d00 ((work_completion)(&fw_work->work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1850 kernel/workqueue.c:3310 #2: ffff8880283ba190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:1014 [inline] #2: ffff8880283ba190 (&dev->mutex){....}-{3:3}, at: ath9k_hif_usb_firmware_fail drivers/net/wireless/ath/ath9k/hif_usb.c:1161 [inline] #2: ffff8880283ba190 (&dev->mutex){....}-{3:3}, at: ath9k_hif_usb_firmware_cb+0x34a/0x4b0 drivers/net/wireless/ath/ath9k/hif_usb.c:1294 #3: ffff888049bfe190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:1014 [inline] #3: ffff888049bfe190 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1095 [inline] #3: ffff888049bfe190 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xce/0x7c0 drivers/base/dd.c:1293 #4: ffff888027c65268 (hcd->bandwidth_mutex){+.+.}-{3:3}, at: usb_set_configuration+0x4fb/0x1fb0 drivers/usb/core/message.c:2077 5 locks held by syz.0.42/5500: #0: ffff888067f66420 (sb_writers#18){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:515 #1: ffff888055989038 (&sb->s_type->i_mutex_key#25){++++}-{3:3}, at: inode_lock include/linux/fs.h:815 [inline] #1: ffff888055989038 (&sb->s_type->i_mutex_key#25){++++}-{3:3}, at: do_truncate+0x20c/0x310 fs/open.c:63 #2: ffff888062900a38 (&c->snapshot_create_lock){.+.+}-{3:3}, at: bch2_truncate+0x16d/0x2c0 fs/bcachefs/io_misc.c:290 #3: ffff888062904398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:151 [inline] #3: ffff888062904398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:250 [inline] #3: ffff888062904398 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7de/0xd20 fs/bcachefs/btree_iter.c:3215 #4: ffff8880629266d0 (&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.42/5548: #0: ffff88802f27b278 (&f->f_pos_lock){+.+.}-{3:3}, at: fdget_pos+0x24e/0x320 fs/file.c:1160 2 locks held by syz.0.42/5550: #0: ffff888067f66420 (sb_writers#18){.+.+}-{0:0}, at: do_ftruncate+0x28b/0x580 fs/open.c:178 #1: ffff888055989038 (&sb->s_type->i_mutex_key#25){++++}-{3:3}, at: inode_lock include/linux/fs.h:815 [inline] #1: ffff888055989038 (&sb->s_type->i_mutex_key#25){++++}-{3:3}, at: do_truncate fs/open.c:63 [inline] #1: ffff888055989038 (&sb->s_type->i_mutex_key#25){++++}-{3:3}, at: do_ftruncate+0x44e/0x580 fs/open.c:181 5 locks held by kworker/u8:12/5724: 3 locks held by syz.2.207/6828: #0: ffff88802d284d80 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close net/bluetooth/hci_core.c:481 [inline] #0: ffff88802d284d80 (&hdev->req_lock){+.+.}-{3:3}, at: hci_unregister_dev+0x203/0x510 net/bluetooth/hci_core.c:2698 #1: ffff88802d284078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x572/0x11a0 net/bluetooth/hci_sync.c:5183 #2: ffffffff8fe3fb68 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1972 [inline] #2: ffffffff8fe3fb68 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xa6/0x240 net/bluetooth/hci_conn.c:2589 3 locks held by syz-executor/7090: #0: ffff888068de4d80 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close net/bluetooth/hci_core.c:481 [inline] #0: ffff888068de4d80 (&hdev->req_lock){+.+.}-{3:3}, at: hci_unregister_dev+0x203/0x510 net/bluetooth/hci_core.c:2698 #1: ffff888068de4078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x572/0x11a0 net/bluetooth/hci_sync.c:5183 #2: ffffffff8fe3fb68 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1972 [inline] #2: ffffffff8fe3fb68 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xa6/0x240 net/bluetooth/hci_conn.c:2589 1 lock held by syz-executor/7340: #0: ffffffff8fcd3308 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #0: ffffffff8fcd3308 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x6e6/0xcf0 net/core/rtnetlink.c:6643 1 lock held by syz-executor/7354: #0: ffffffff8fcd3308 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #0: ffffffff8fcd3308 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x6e6/0xcf0 net/core/rtnetlink.c:6643 4 locks held by udevd/7357: #0: ffff8880594b09e0 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xb4/0xd70 fs/seq_file.c:182 #1: ffff888030a9b088 (&of->mutex#2){+.+.}-{3:3}, at: kernfs_seq_start+0x53/0x3b0 fs/kernfs/file.c:154 #2: ffff888030ab4f08 (kn->active#27){.+.+}-{0:0}, at: kernfs_seq_start+0x72/0x3b0 fs/kernfs/file.c:155 #3: ffff888049bfe190 (&dev->mutex){....}-{3:3}, at: device_lock_interruptible include/linux/device.h:1019 [inline] #3: ffff888049bfe190 (&dev->mutex){....}-{3:3}, at: manufacturer_show+0x26/0xa0 drivers/usb/core/sysfs.c:142 3 locks held by kworker/1:8/7386: 1 lock held by syz.3.278/7399: #0: ffff88823bf74c88 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:815 [inline] #0: ffff88823bf74c88 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release net/socket.c:658 [inline] #0: ffff88823bf74c88 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: sock_close+0x90/0x240 net/socket.c:1427 ============================================= NMI backtrace for cpu 0 CPU: 0 UID: 0 PID: 30 Comm: khungtaskd Not tainted 6.11.0-next-20240927-syzkaller #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: 5724 Comm: kworker/u8:12 Not tainted 6.11.0-next-20240927-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: events_unbound toggle_allocation_gate RIP: 0010:check_preemption_disabled+0x4/0x120 lib/smp_processor_id.c:13 Code: 8c 48 c7 c6 40 02 61 8c eb 1c 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 41 57 41 56 <41> 54 53 48 83 ec 10 65 48 8b 04 25 28 00 00 00 48 89 44 24 08 65 RSP: 0018:ffffc90000a18df0 EFLAGS: 00000046 RAX: 0000000000000101 RBX: ffffffff8157875e RCX: 0000000000000009 RDX: 0000000000000000 RSI: ffffffff8c0acac0 RDI: ffffffff8c610260 RBP: ffffc90000a18f50 R08: ffffffff901d062f R09: 1ffffffff203a0c5 R10: dffffc0000000000 R11: fffffbfff203a0c6 R12: 0000000000000000 R13: 0000000000000008 R14: ffffffff8157875e R15: ffff888027219e00 FS: 0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000204d9000 CR3: 000000004d1f8000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: lockdep_hardirqs_off+0xa9/0x110 kernel/locking/lockdep.c:4491 trace_hardirqs_off+0x12/0x40 kernel/trace/trace_preemptirq.c:87 handle_softirqs+0x64e/0x980 kernel/softirq.c:569 __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:finish_task_switch+0x1ea/0x870 kernel/sched/core.c:5189 Code: c9 50 e8 09 fa 0b 00 48 83 c4 08 4c 89 f7 e8 4d 39 00 00 e9 de 04 00 00 4c 89 f7 e8 50 ee 6c 0a e8 9b 55 38 00 fb 48 8b 5d c0 <48> 8d bb f8 15 00 00 48 89 f8 48 c1 e8 03 49 be 00 00 00 00 00 fc RSP: 0018:ffffc900099073c8 EFLAGS: 00000282 RAX: ce0fd6c43af10400 RBX: ffff888027219e00 RCX: ffffffff8170b64a RDX: dffffc0000000000 RSI: ffffffff8c0acaa0 RDI: ffffffff8c610260 RBP: ffffc90009907410 R08: ffffffff942cb807 R09: 1ffffffff2859700 R10: dffffc0000000000 R11: fffffbfff2859701 R12: 1ffff110170e7f14 R13: dffffc0000000000 R14: ffff8880b863ea80 R15: ffff8880b873f8a0 context_switch kernel/sched/core.c:5318 [inline] __schedule+0x189d/0x4b30 kernel/sched/core.c:6675 preempt_schedule_common+0x84/0xd0 kernel/sched/core.c:6854 preempt_schedule+0xe1/0xf0 kernel/sched/core.c:6878 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk.S:12 __raw_spin_unlock include/linux/spinlock_api_smp.h:143 [inline] _raw_spin_unlock+0x3e/0x50 kernel/locking/spinlock.c:186 spin_unlock include/linux/spinlock.h:391 [inline] __text_poke+0xa6b/0xd30 arch/x86/kernel/alternative.c:1960 text_poke arch/x86/kernel/alternative.c:1984 [inline] text_poke_bp_batch+0x59c/0xb30 arch/x86/kernel/alternative.c:2317 text_poke_flush arch/x86/kernel/alternative.c:2486 [inline] text_poke_finish+0x30/0x50 arch/x86/kernel/alternative.c:2493 arch_jump_label_transform_apply+0x1c/0x30 arch/x86/kernel/jump_label.c:146 static_key_disable_cpuslocked+0xd2/0x1c0 kernel/jump_label.c:240 static_key_disable+0x1a/0x20 kernel/jump_label.c:248 toggle_allocation_gate+0x1bf/0x260 mm/kfence/core.c:854 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa63/0x1850 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