INFO: task syz.2.745:9236 blocked for more than 143 seconds. Not tainted 6.12.0-next-20241128-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.2.745 state:D stack:21624 pid:9236 tgid:9190 ppid:5843 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5369 [inline] __schedule+0x1850/0x4c30 kernel/sched/core.c:6756 __schedule_loop kernel/sched/core.c:6833 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6848 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6905 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:818 [inline] do_lock_mount+0x112/0x3a0 fs/namespace.c:2607 lock_mount fs/namespace.c:2649 [inline] do_loopback+0x2be/0x520 fs/namespace.c:2772 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4034 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:0x7ff148580849 RSP: 002b:00007ff1492f2058 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ff148746080 RCX: 00007ff148580849 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000020000000 RBP: 00007ff1485f3986 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000851804 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ff148746080 R15: 00007ffc28314bf8 INFO: task syz.2.745:9238 blocked for more than 143 seconds. Not tainted 6.12.0-next-20241128-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.2.745 state:D stack:26864 pid:9238 tgid:9190 ppid:5843 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5369 [inline] __schedule+0x1850/0x4c30 kernel/sched/core.c:6756 __schedule_loop kernel/sched/core.c:6833 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6848 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6905 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:818 [inline] process_measurement+0x439/0x1fb0 security/integrity/ima/ima_main.c:250 ima_file_check+0xd9/0x120 security/integrity/ima/ima_main.c:572 security_file_post_open+0xb9/0x280 security/security.c:3121 do_open fs/namei.c:3830 [inline] path_openat+0x2ccd/0x3590 fs/namei.c:3987 do_filp_open+0x27f/0x4e0 fs/namei.c:4014 do_sys_openat2+0x13e/0x1d0 fs/open.c:1402 do_sys_open fs/open.c:1417 [inline] __do_sys_creat fs/open.c:1495 [inline] __se_sys_creat fs/open.c:1489 [inline] __x64_sys_creat+0x123/0x170 fs/open.c:1489 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:0x7ff148580849 RSP: 002b:00007ff1492d1058 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007ff148746160 RCX: 00007ff148580849 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000140 RBP: 00007ff1485f3986 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ff148746160 R15: 00007ffc28314bf8 INFO: task syz.2.745:9254 blocked for more than 143 seconds. Not tainted 6.12.0-next-20241128-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.2.745 state:D stack:27296 pid:9254 tgid:9190 ppid:5843 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5369 [inline] __schedule+0x1850/0x4c30 kernel/sched/core.c:6756 __schedule_loop kernel/sched/core.c:6833 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6848 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6905 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:818 [inline] bch2_write_iter+0x134/0x2440 fs/bcachefs/fs-io-buffered.c:1058 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 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:0x7ff148580849 RSP: 002b:00007ff1492b0058 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ff148746240 RCX: 00007ff148580849 RDX: 0000000000000028 RSI: 0000000020000040 RDI: 0000000000000007 RBP: 00007ff1485f3986 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ff148746240 R15: 00007ffc28314bf8 INFO: task syz.2.745:9258 blocked for more than 143 seconds. Not tainted 6.12.0-next-20241128-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.2.745 state:D stack:26576 pid:9258 tgid:9190 ppid:5843 flags:0x00000004 Call Trace: context_switch kernel/sched/core.c:5369 [inline] __schedule+0x1850/0x4c30 kernel/sched/core.c:6756 __schedule_loop kernel/sched/core.c:6833 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6848 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6905 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:818 [inline] do_truncate fs/open.c:63 [inline] do_ftruncate+0x44e/0x580 fs/open.c:181 do_sys_ftruncate fs/open.c:196 [inline] __do_sys_ftruncate fs/open.c:201 [inline] __se_sys_ftruncate fs/open.c:199 [inline] __x64_sys_ftruncate+0x94/0xf0 fs/open.c:199 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:0x7ff148580849 RSP: 002b:00007ff145bf2058 EFLAGS: 00000246 ORIG_RAX: 000000000000004d RAX: ffffffffffffffda RBX: 00007ff148746320 RCX: 00007ff148580849 RDX: 0000000000000000 RSI: 0000000000000800 RDI: 0000000000000007 RBP: 00007ff1485f3986 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ff148746320 R15: 00007ffc28314bf8 Showing all locks held in the system: 1 lock held by khungtaskd/30: #0: ffffffff8e937b20 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #0: ffffffff8e937b20 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #0: ffffffff8e937b20 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6744 6 locks held by kworker/1:1/46: #0: ffff8881436d5548 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline] #0: ffff8881436d5548 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3310 #1: ffffc90000b67d00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline] #1: ffffc90000b67d00 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3310 #2: ffff88802971c190 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1014 [inline] #2: ffff88802971c190 (&dev->mutex){....}-{4:4}, at: hub_event+0x1fe/0x5150 drivers/usb/core/hub.c:5849 #3: ffff888029770510 (&port_dev->status_lock){+.+.}-{4:4}, at: usb_lock_port drivers/usb/core/hub.c:3206 [inline] #3: ffff888029770510 (&port_dev->status_lock){+.+.}-{4:4}, at: hub_port_connect drivers/usb/core/hub.c:5418 [inline] #3: ffff888029770510 (&port_dev->status_lock){+.+.}-{4:4}, at: hub_port_connect_change drivers/usb/core/hub.c:5661 [inline] #3: ffff888029770510 (&port_dev->status_lock){+.+.}-{4:4}, at: port_event drivers/usb/core/hub.c:5821 [inline] #3: ffff888029770510 (&port_dev->status_lock){+.+.}-{4:4}, at: hub_event+0x25b9/0x5150 drivers/usb/core/hub.c:5903 #4: ffff8880292fa368 (hcd->address0_mutex){+.+.}-{4:4}, at: hub_port_connect drivers/usb/core/hub.c:5419 [inline] #4: ffff8880292fa368 (hcd->address0_mutex){+.+.}-{4:4}, at: hub_port_connect_change drivers/usb/core/hub.c:5661 [inline] #4: ffff8880292fa368 (hcd->address0_mutex){+.+.}-{4:4}, at: port_event drivers/usb/core/hub.c:5821 [inline] #4: ffff8880292fa368 (hcd->address0_mutex){+.+.}-{4:4}, at: hub_event+0x25f7/0x5150 drivers/usb/core/hub.c:5903 #5: ffffffff8f591d30 (ehci_cf_port_reset_rwsem){.+.+}-{4:4}, at: hub_port_reset+0x1f8/0x1b30 drivers/usb/core/hub.c:3021 3 locks held by kworker/u8:3/52: 2 locks held by getty/5585: #0: ffff88803509a0a0 (&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/u8:10/6655: 2 locks held by kworker/u8:11/6657: 5 locks held by syz.2.745/9191: #0: ffff88807bac4420 (sb_writers#35){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:515 #1: ffff88805b459068 (&sb->s_type->i_mutex_key#42){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] #1: ffff88805b459068 (&sb->s_type->i_mutex_key#42){+.+.}-{4:4}, at: do_truncate+0x20c/0x310 fs/open.c:63 #2: ffff888054b80a48 (&c->snapshot_create_lock){.+.+}-{4:4}, at: bch2_truncate+0x166/0x2d0 fs/bcachefs/io_misc.c:292 #3: ffff888054b843a8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:158 [inline] #3: ffff888054b843a8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:249 [inline] #3: ffff888054b843a8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7e4/0xd30 fs/bcachefs/btree_iter.c:3354 #4: ffff888054ba6710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x682/0x14e0 fs/bcachefs/btree_update_interior.c:1191 1 lock held by syz.2.745/9236: #0: ffff88805b459068 (&sb->s_type->i_mutex_key#42){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] #0: ffff88805b459068 (&sb->s_type->i_mutex_key#42){+.+.}-{4:4}, at: do_lock_mount+0x112/0x3a0 fs/namespace.c:2607 2 locks held by syz.2.745/9238: #0: ffff88807bac4420 (sb_writers#35){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:515 #1: ffff88805b459068 (&sb->s_type->i_mutex_key#42){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] #1: ffff88805b459068 (&sb->s_type->i_mutex_key#42){+.+.}-{4:4}, at: process_measurement+0x439/0x1fb0 security/integrity/ima/ima_main.c:250 3 locks held by syz.2.745/9254: #0: ffff8880334c22b8 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x254/0x320 fs/file.c:1191 #1: ffff88807bac4420 (sb_writers#35){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2964 [inline] #1: ffff88807bac4420 (sb_writers#35){.+.+}-{0:0}, at: vfs_write+0x225/0xd30 fs/read_write.c:675 #2: ffff88805b459068 (&sb->s_type->i_mutex_key#42){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] #2: ffff88805b459068 (&sb->s_type->i_mutex_key#42){+.+.}-{4:4}, at: bch2_write_iter+0x134/0x2440 fs/bcachefs/fs-io-buffered.c:1058 2 locks held by syz.2.745/9258: #0: ffff88807bac4420 (sb_writers#35){.+.+}-{0:0}, at: do_ftruncate+0x28b/0x580 fs/open.c:178 #1: ffff88805b459068 (&sb->s_type->i_mutex_key#42){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] #1: ffff88805b459068 (&sb->s_type->i_mutex_key#42){+.+.}-{4:4}, at: do_truncate fs/open.c:63 [inline] #1: ffff88805b459068 (&sb->s_type->i_mutex_key#42){+.+.}-{4:4}, at: do_ftruncate+0x44e/0x580 fs/open.c:181 4 locks held by bch-reclaim/loo/9226: #0: ffff888054bcb068 (&j->reclaim_lock){+.+.}-{4:4}, at: bch2_journal_reclaim_thread+0x16d/0x570 fs/bcachefs/journal_reclaim.c:742 #1: ffff888054b843a8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:158 [inline] #1: ffff888054b843a8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:249 [inline] #1: ffff888054b843a8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get+0x7e4/0xd30 fs/bcachefs/btree_iter.c:3354 #2: ffff888054b84750 (&wb->flushing.lock){+.+.}-{4:4}, at: btree_write_buffer_flush_seq+0x1c3f/0x1e10 fs/bcachefs/btree_write_buffer.c:548 #3: ffff888054ba6710 (&c->gc_lock){++++}-{4:4}, at: bch2_btree_update_start+0x682/0x14e0 fs/bcachefs/btree_update_interior.c:1191 2 locks held by syz.3.1255/11362: 5 locks held by syz.7.1259/11361: 1 lock held by syz.9.1261/11370: 2 locks held by syz-executor/11365: 2 locks held by syz.4.1263/11366: #0: ffff8880574b5608 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] #0: ffff8880574b5608 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: __sock_release net/socket.c:639 [inline] #0: ffff8880574b5608 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: sock_close+0x90/0x240 net/socket.c:1408 #1: ffffffff8e93d038 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock kernel/rcu/tree_exp.h:297 [inline] #1: ffffffff8e93d038 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x381/0x830 kernel/rcu/tree_exp.h:976 2 locks held by syz.4.1263/11369: #0: ffffffff8f161068 (tty_mutex){+.+.}-{4:4}, at: tty_open_by_driver drivers/tty/tty_io.c:2046 [inline] #0: ffffffff8f161068 (tty_mutex){+.+.}-{4:4}, at: tty_open+0x232/0xde0 drivers/tty/tty_io.c:2129 #1: ffff88807d9ef1c0 (&tty->legacy_mutex){+.+.}-{4:4}, at: tty_init_dev+0x78/0x4c0 drivers/tty/tty_io.c:1415 ============================================= NMI backtrace for cpu 1 CPU: 1 UID: 0 PID: 30 Comm: khungtaskd Not tainted 6.12.0-next-20241128-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: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: 11370 Comm: syz.9.1261 Not tainted 6.12.0-next-20241128-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 RIP: 0010:pid_vnr+0x6/0x1d0 kernel/pid.c:500 Code: 80 c1 03 38 c1 7c aa 48 89 df e8 45 6e a0 00 eb a0 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 41 57 <41> 56 41 55 41 54 53 49 89 fe 49 bc 00 00 00 00 00 fc ff df e8 a1 RSP: 0018:ffffc9000424f6f0 EFLAGS: 00000246 RAX: 1ffff92000849ef8 RBX: ffff88807d973a30 RCX: dffffc0000000000 RDX: ffffc90011d4c000 RSI: 000000000007ffff RDI: 0000000000000000 RBP: ffffc9000424f8b0 R08: ffffffff8a6f767a R09: 1ffff11005464534 R10: dffffc0000000000 R11: ffffed1005464535 R12: ffffc9000424f7c0 R13: ffff88807d973a00 R14: 0000000000000000 R15: 1ffff92000849ef4 FS: 00007fec9df2e6c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30e0bff8 CR3: 0000000034dbe000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: scm_set_cred include/net/scm.h:73 [inline] __unix_dgram_recvmsg+0x9d4/0x12f0 net/unix/af_unix.c:2488 sock_recvmsg_nosec+0x18e/0x1d0 net/socket.c:1033 ____sys_recvmsg+0x3cd/0x480 net/socket.c:2801 ___sys_recvmsg net/socket.c:2845 [inline] do_recvmmsg+0x426/0xab0 net/socket.c:2940 __sys_recvmmsg net/socket.c:3014 [inline] __do_sys_recvmmsg net/socket.c:3037 [inline] __se_sys_recvmmsg net/socket.c:3030 [inline] __x64_sys_recvmmsg+0x199/0x250 net/socket.c:3030 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:0x7fec9d180849 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fec9df2e058 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007fec9d346080 RCX: 00007fec9d180849 RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000005 RBP: 00007fec9d1f3986 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec9d346080 R15: 00007ffd96752208