Kernel bug: INFO: task hung in sync_bdevs (3)
Subsystem: block
Status: open

Crash report:
INFO: task syz.0.17:6024 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.17        state:D stack:24064 pid:6024  tgid:6024  ppid:5952   task_flags:0x400140 flags:0x00080002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5258 [inline]
 __schedule+0x150e/0x5070 kernel/sched/core.c:6866
 __schedule_loop kernel/sched/core.c:6948 [inline]
 schedule+0x165/0x360 kernel/sched/core.c:6963
 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:7020
 __mutex_lock_common kernel/locking/mutex.c:692 [inline]
 __mutex_lock+0x7e6/0x1350 kernel/locking/mutex.c:776
 sync_bdevs+0x27e/0x470 block/bdev.c:1305
 ksys_sync+0xb9/0x150 fs/sync.c:105
 __ia32_sys_sync+0xe/0x20 fs/sync.c:113
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f0bfe58f749
RSP: 002b:00007ffe7ac202a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a2
RAX: ffffffffffffffda RBX: 00007f0bfe7e5fa0 RCX: 00007f0bfe58f749
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f0bfe7e5fa0 R14: 00007f0bfe7e5fa0 R15: 0000000000000000
 </TASK>

Showing all locks held in the system:
9 locks held by kworker/u8:1/13:
 #0: ffff88813fe69948 ((wq_completion)events_unbound#2){+.+.}-{0:0}, at: process_one_work+0x841/0x15a0 kernel/workqueue.c:3254
 #1: ffffc90000127b80 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work+0x868/0x15a0 kernel/workqueue.c:3255
 #2: ffffffff8f72ac88 (rtnl_mutex){+.+.}-{4:4}, at: linkwatch_event+0xe/0x60 net/core/link_watch.c:303
 #3: ffffffff8e3453f8 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock kernel/rcu/tree_exp.h:311 [inline]
 #3: ffffffff8e3453f8 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x2f6/0x730 kernel/rcu/tree_exp.h:956
 #4: ffff8880b863ab18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:639
 #5: ffff8880b8624588 (psi_seq){-.-.}-{0:0}, at: psi_task_switch+0x53/0x880 kernel/sched/psi.c:933
 #6: ffff8880b873ab18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:639
 #7: ffff8880b8724588 (psi_seq){-.-.}-{0:0}, at: psi_task_change+0xd9/0x340 kernel/sched/psi.c:919
 #8: ffffffff9a0493b8 (&port_lock_key){-.-.}-{3:3}, at: uart_port_lock_irqsave include/linux/serial_core.h:717 [inline]
 #8: ffffffff9a0493b8 (&port_lock_key){-.-.}-{3:3}, at: serial8250_console_write+0x17e/0x1ba0 drivers/tty/serial/8250/8250_port.c:3301
3 locks held by kworker/1:0/24:
 #0: ffff88813fe55948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x841/0x15a0 kernel/workqueue.c:3254
 #1: ffffc900001e7b80 ((work_completion)(&data->fib_event_work)){+.+.}-{0:0}, at: process_one_work+0x868/0x15a0 kernel/workqueue.c:3255
 #2: ffff888030763240 (&data->fib_lock){+.+.}-{4:4}, at: nsim_fib_event_work+0x1f7/0x3b0 drivers/net/netdevsim/fib.c:1490
1 lock held by khungtaskd/31:
 #0: ffffffff8e33f8a0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 #0: ffffffff8e33f8a0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:867 [inline]
 #0: ffffffff8e33f8a0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180 kernel/locking/lockdep.c:6775
2 locks held by kworker/u9:0/52:
 #0: ffff888025d09948 ((wq_completion)nbd0-recv){+.+.}-{0:0}, at: process_one_work+0x841/0x15a0 kernel/workqueue.c:3254
 #1: ffffc90000bd7b80 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work+0x868/0x15a0 kernel/workqueue.c:3255
3 locks held by kworker/u8:14/3948:
 #0: ffff888030773948 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work+0x841/0x15a0 kernel/workqueue.c:3254
 #1: ffffc9000c9f7b80 ((work_completion)(&(&ifa->dad_work)->work)){+.+.}-{0:0}, at: process_one_work+0x868/0x15a0 kernel/workqueue.c:3255
 #2: ffffffff8f72ac88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_net_lock include/linux/rtnetlink.h:130 [inline]
 #2: ffffffff8f72ac88 (rtnl_mutex){+.+.}-{4:4}, at: addrconf_dad_work+0x112/0x14b0 net/ipv6/addrconf.c:4194
2 locks held by kworker/u9:1/5151:
 #0: ffff888025d0f148 ((wq_completion)nbd1-recv){+.+.}-{0:0}, at: process_one_work+0x841/0x15a0 kernel/workqueue.c:3254
 #1: ffffc9000eddfb80 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work+0x868/0x15a0 kernel/workqueue.c:3255
2 locks held by getty/5590:
 #0: ffff8880357a90a0 (&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+0x449/0x1460 drivers/tty/n_tty.c:2211
1 lock held by udevd/5848:
 #0: ffff888142b79358 (&disk->open_mutex){+.+.}-{4:4}, at: bdev_open+0xe0/0xd30 block/bdev.c:962
1 lock held by udevd/5851:
 #0: ffff888142b2f358 (&disk->open_mutex){+.+.}-{4:4}, at: bdev_open+0xe0/0xd30 block/bdev.c:962
2 locks held by kworker/u9:2/5860:
 #0: ffff888025d3c948 ((wq_completion)nbd2-recv){+.+.}-{0:0}, at: process_one_work+0x841/0x15a0 kernel/workqueue.c:3254
 #1: ffffc900042ffb80 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work+0x868/0x15a0 kernel/workqueue.c:3255
1 lock held by udevd/5961:
 #0: ffff888142b7b358 (&disk->open_mutex){+.+.}-{4:4}, at: bdev_open+0xe0/0xd30 block/bdev.c:962
1 lock held by syz.0.17/6024:
 #0: ffff888142b2f358 (&disk->open_mutex){+.+.}-{4:4}, at: sync_bdevs+0x27e/0x470 block/bdev.c:1305
2 locks held by kworker/u9:3/6045:
 #0: ffff888025f2b148 ((wq_completion)nbd7-recv){+.+.}-{0:0}, at: process_one_work+0x841/0x15a0 kernel/workqueue.c:3254
 #1: ffffc90003307b80 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work+0x868/0x15a0 kernel/workqueue.c:3255
1 lock held by syz.1.18/6063:
 #0: ffff888142b79358 (&disk->open_mutex){+.+.}-{4:4}, at: sync_bdevs+0x27e/0x470 block/bdev.c:1305
2 locks held by kworker/u9:4/6067:
 #0: ffff888025d49948 ((wq_completion)nbd3-recv){+.+.}-{0:0}, at: process_one_work+0x841/0x15a0 kernel/workqueue.c:3254
 #1: ffffc90003bdfb80 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work+0x868/0x15a0 kernel/workqueue.c:3255
1 lock held by syz.2.19/6084:
 #0: ffff888142b7b358 (&disk->open_mutex){+.+.}-{4:4}, at: sync_bdevs+0x27e/0x470 block/bdev.c:1305
1 lock held by udevd/6087:
 #0: ffff888142b7d358 (&disk->open_mutex){+.+.}-{4:4}, at: bdev_open+0xe0/0xd30 block/bdev.c:962
2 locks held by kworker/u9:5/6089:
 #0: ffff888025f16148 ((wq_completion)nbd6-recv){+.+.}-{0:0}, at: process_one_work+0x841/0x15a0 kernel/workqueue.c:3254
 #1: ffffc90003a5fb80 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work+0x868/0x15a0 kernel/workqueue.c:3255
1 lock held by syz.3.20/6106:
 #0: ffff888142b7d358 (&disk->open_mutex){+.+.}-{4:4}, at: sync_bdevs+0x27e/0x470 block/bdev.c:1305
3 locks held by kworker/0:5/6107:
 #0: ffff88813fe55948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x841/0x15a0 kernel/workqueue.c:3254
 #1: ffffc9000391fb80 (deferred_process_work){+.+.}-{0:0}, at: process_one_work+0x868/0x15a0 kernel/workqueue.c:3255
 #2: ffffffff8f72ac88 (rtnl_mutex){+.+.}-{4:4}, at: switchdev_deferred_process_work+0xe/0x20 net/switchdev/switchdev.c:104
2 locks held by kworker/u9:6/6116:
 #0: ffff888025d4f148 ((wq_completion)nbd4-recv){+.+.}-{0:0}, at: process_one_work+0x841/0x15a0 kernel/workqueue.c:3254
 #1: ffffc90002f47b80 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work+0x868/0x15a0 kernel/workqueue.c:3255
1 lock held by udevd/6118:
 #0: ffff888142b7f358 (&disk->open_mutex){+.+.}-{4:4}, at: bdev_open+0xe0/0xd30 block/bdev.c:962
1 lock held by syz.4.21/6141:
 #0: ffff888142b7f358 (&disk->open_mutex){+.+.}-{4:4}, at: sync_bdevs+0x27e/0x470 block/bdev.c:1305
1 lock held by udevd/6146:
 #0: ffff888025ea3358 (&disk->open_mutex){+.+.}-{4:4}, at: bdev_open+0xe0/0xd30 block/bdev.c:962
2 locks held by kworker/u9:7/6147:
 #0: ffff888025eab148 ((wq_completion)nbd5-recv){+.+.}-{0:0}, at: process_one_work+0x841/0x15a0 kernel/workqueue.c:3254
 #1: ffffc90003f3fb80 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work+0x868/0x15a0 kernel/workqueue.c:3255
1 lock held by syz.5.22/6170:
 #0: ffff888025ea3358 (&disk->open_mutex){+.+.}-{4:4}, at: sync_bdevs+0x27e/0x470 block/bdev.c:1305
1 lock held by udevd/6175:
 #0: ffff888025f1b358 (&disk->open_mutex){+.+.}-{4:4}, at: bdev_open+0xe0/0xd30 block/bdev.c:962
1 lock held by syz.6.23/6200:
 #0: ffff888025f1b358 (&disk->open_mutex){+.+.}-{4:4}, at: sync_bdevs+0x27e/0x470 block/bdev.c:1305
2 locks held by kworker/u9:9/6205:
 #0: ffff888025f30948 ((wq_completion)nbd8-recv){+.+.}-{0:0}, at: process_one_work+0x841/0x15a0 kernel/workqueue.c:3254
 #1: ffffc900040c7b80 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work+0x868/0x15a0 kernel/workqueue.c:3255
1 lock held by udevd/6206:
 #0: ffff888025f1f358 (&disk->open_mutex){+.+.}-{4:4}, at: bdev_open+0xe0/0xd30 block/bdev.c:962
1 lock held by udevd/6207:
 #0: ffff888025f1d358 (&disk->open_mutex){+.+.}-{4:4}, at: bdev_open+0xe0/0xd30 block/bdev.c:962
1 lock held by syz.7.24/6230:
 #0: ffff888025f1d358 (&disk->open_mutex){+.+.}-{4:4}, at: sync_bdevs+0x27e/0x470 block/bdev.c:1305
1 lock held by syz.8.25/6263:
 #0: ffff888025f1f358 (&disk->open_mutex){+.+.}-{4:4}, at: sync_bdevs+0x27e/0x470 block/bdev.c:1305
1 lock held by syz-executor/6268:
 #0: ffffffff8f72ac88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:80 [inline]
 #0: ffffffff8f72ac88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_nets_lock net/core/rtnetlink.c:341 [inline]
 #0: ffffffff8f72ac88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0x8ec/0x1c90 net/core/rtnetlink.c:4071

=============================================

NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 31 Comm: khungtaskd Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 nmi_cpu_backtrace+0x39e/0x3d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x17a/0x300 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline]
 __sys_info lib/sys_info.c:157 [inline]
 sys_info+0x135/0x170 lib/sys_info.c:165
 check_hung_uninterruptible_tasks kernel/hung_task.c:363 [inline]
 watchdog+0xe40/0xe90 kernel/hung_task.c:557
 kthread+0x711/0x8a0 kernel/kthread.c:463
 ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:cpufreq_get_pressure include/linux/cpufreq.h:255 [inline]
RIP: 0010:get_actual_cpu_capacity kernel/sched/fair.c:4916 [inline]
RIP: 0010:scale_rt_capacity kernel/sched/fair.c:10036 [inline]
RIP: 0010:update_cpu_capacity kernel/sched/fair.c:10063 [inline]
RIP: 0010:update_group_capacity+0x2ce/0x920 kernel/sched/fair.c:10089
Code: 03 48 be 00 00 00 00 00 fc ff df 80 3c 30 00 74 12 4c 89 f7 e8 d3 bb 93 00 48 be 00 00 00 00 00 fc ff df 49 c7 c5 08 72 c5 92 <4d> 03 2e 4c 89 e8 48 c1 e8 03 80 3c 30 00 74 12 4c 89 ef e8 aa bb
RSP: 0018:ffffc90000007728 EFLAGS: 00000246
RAX: 1ffffffff1b995ba RBX: 0000000000000400 RCX: ffffffff8e094dc0
RDX: 0000000000000100 RSI: dffffc0000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffff88801cef7daf R09: 1ffff110039defb5
R10: dffffc0000000000 R11: ffffed10039defb6 R12: 0000000000000000
R13: ffffffff92c57208 R14: ffffffff8dccadd0 R15: 1ffff110037db482
FS:  0000000000000000(0000) GS:ffff8881259e1000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f19c17135c0 CR3: 000000000e138000 CR4: 00000000003526f0
Call Trace:
 <IRQ>
 update_sd_lb_stats kernel/sched/fair.c:11105 [inline]
 sched_balance_find_src_group kernel/sched/fair.c:11367 [inline]
 sched_balance_rq+0x943/0x57e0 kernel/sched/fair.c:11853
 sched_balance_domains+0x45e/0x960 kernel/sched/fair.c:12313
 _nohz_idle_balance+0x59d/0x810 kernel/sched/fair.c:12745
 handle_softirqs+0x27d/0x850 kernel/softirq.c:626
 __do_softirq kernel/softirq.c:660 [inline]
 invoke_softirq kernel/softirq.c:496 [inline]
 __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:727
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:743
 instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline]
 sysvec_call_function_single+0xa3/0xc0 arch/x86/kernel/smp.c:266
 </IRQ>
 <TASK>
 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:704
RIP: 0010:pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:82
Code: cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d 33 be 21 00 f3 0f 1e fa fb f4 <e9> 48 ee 02 00 cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffffff8e007d80 EFLAGS: 000002c6
RAX: 82835f0117bb3600 RBX: ffffffff8197c88a RCX: 82835f0117bb3600
RDX: 0000000000000001 RSI: ffffffff8daa76bd RDI: ffffffff8be243e0
RBP: ffffffff8e007ea8 R08: ffff8880b86336db R09: 1ffff110170c66db
R10: dffffc0000000000 R11: ffffed10170c66dc R12: ffffffff8fc3b070
R13: 1ffffffff1c129b8 R14: 0000000000000000 R15: 0000000000000000
 arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline]
 default_idle+0x13/0x20 arch/x86/kernel/process.c:767
 default_idle_call+0x73/0xb0 kernel/sched/idle.c:122
 cpuidle_idle_call kernel/sched/idle.c:191 [inline]
 do_idle+0x1ea/0x520 kernel/sched/idle.c:332
 cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:430
 rest_init+0x2de/0x300 init/main.c:757
 start_kernel+0x3a7/0x400 init/main.c:1206
 x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310
 x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:291
 common_startup_64+0x13e/0x147
 </TASK>