syzbot


INFO: task hung in blkdev_flush_mapping

Status: upstream: reported on 2025/07/26 12:40
Reported-by: syzbot+aca943e9bfecae726854@syzkaller.appspotmail.com
First crash: 10d, last: 10d
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: task hung in blkdev_flush_mapping 1 1 497d 497d 0/3 auto-obsoleted due to no activity on 2024/07/04 14:18
linux-6.1 INFO: task hung in blkdev_flush_mapping origin:upstream 1 C error 20 122d 696d 0/3 upstream: reported C repro on 2023/09/09 22:51
upstream INFO: task hung in blkdev_flush_mapping block 1 C unreliable error 18 11d 596d 0/29 upstream: reported C repro on 2023/12/18 10:31

Sample crash report:
INFO: task udevd:5798 blocked for more than 143 seconds.
      Not tainted 6.6.100-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd           state:D stack:23216 pid:5798  ppid:5156   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5381 [inline]
 __schedule+0x14d2/0x44d0 kernel/sched/core.c:6700
 schedule+0xbd/0x170 kernel/sched/core.c:6774
 io_schedule+0x80/0xd0 kernel/sched/core.c:9023
 folio_wait_bit_common+0x6eb/0xf70 mm/filemap.c:1329
 __filemap_get_folio+0xbc/0xbc0 mm/filemap.c:1910
 truncate_inode_pages_range+0x40a/0xf00 mm/truncate.c:376
 kill_bdev block/bdev.c:76 [inline]
 blkdev_flush_mapping+0x132/0x290 block/bdev.c:632
 blkdev_put_whole block/bdev.c:663 [inline]
 blkdev_put+0x498/0x760 block/bdev.c:941
 blkdev_release+0x84/0x90 block/fops.c:604
 __fput+0x234/0x970 fs/file_table.c:384
 task_work_run+0x1ce/0x250 kernel/task_work.c:239
 exit_task_work include/linux/task_work.h:43 [inline]
 do_exit+0x90b/0x23c0 kernel/exit.c:883
 do_group_exit+0x21b/0x2d0 kernel/exit.c:1024
 get_signal+0x12fc/0x1400 kernel/signal.c:2902
 arch_do_signal_or_restart+0x96/0x780 arch/x86/kernel/signal.c:310
 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
 do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:87
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f5fa69d3407
RSP: 002b:00007fff22cbf780 EFLAGS: 00000202 ORIG_RAX: 0000000000000000
RAX: fffffffffffffffc RBX: 00007f5fa6947880 RCX: 00007f5fa69d3407
RDX: 0000000000000200 RSI: 00007f5fa6946000 RDI: 0000000000000009
RBP: 000055892f149060 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000
R13: 0000000000000000 R14: 000055892f14b898 R15: 00007f5fa6bec39c
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/29:
 #0: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
 #0: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline]
 #0: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x290 kernel/locking/lockdep.c:6633
2 locks held by getty/5547:
 #0: ffff88814ca4a0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc9000327b2f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x425/0x1380 drivers/tty/n_tty.c:2217
1 lock held by udevd/5798:
 #0: ffff888141f0c4c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xff/0x760 block/bdev.c:927
1 lock held by syz.1.1152/9674:
1 lock held by syz.3.1153/9675:
 #0: ffffffff8cd35a40 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x4c/0x580 kernel/rcu/tree.c:4089

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

NMI backtrace for cpu 1
CPU: 1 PID: 29 Comm: khungtaskd Not tainted 6.6.100-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x39b/0x3d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x17a/0x2f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:222 [inline]
 watchdog+0xf41/0xf80 kernel/hung_task.c:379
 kthread+0x2fa/0x390 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 48 Comm: kworker/u4:3 Not tainted 6.6.100-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: events_unbound cfg80211_wiphy_work
RIP: 0010:lock_release+0x566/0x8b0 kernel/locking/lockdep.c:5777
Code: ff 65 0f c1 05 d3 fa 9a 7e 83 f8 01 75 75 48 c7 84 24 80 00 00 00 00 00 00 00 9c 8f 84 24 80 00 00 00 f6 84 24 81 00 00 00 02 <75> 75 f7 44 24 50 00 02 00 00 74 01 fb 48 c7 44 24 60 0e 36 e0 45
RSP: 0018:ffffc90000b8f960 EFLAGS: 00000046
RAX: 0000000000000001 RBX: a6610cee64463cf9 RCX: aff465a693dd0100
RDX: 0000000000000003 RSI: ffffffff8aaacbc0 RDI: ffffffff8afc6700
RBP: ffffc90000b8fa78 R08: ffffffff8e4a7daf R09: 1ffffffff1c94fb5
R10: dffffc0000000000 R11: fffffbfff1c94fb6 R12: ffff88801868c758
R13: dffffc0000000000 R14: ffff88801868c6d0 R15: 1ffff92000171f38
FS:  0000000000000000(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000404030 CR3: 000000000cb30000 CR4: 00000000003506f0
Call Trace:
 <TASK>
 local_lock_release include/linux/local_lock_internal.h:38 [inline]
 kcov_remote_stop+0x16a/0x6e0 kernel/kcov.c:1010
 ieee80211_iface_work+0x78d/0xc70 net/mac80211/iface.c:1700
 cfg80211_wiphy_work+0x225/0x260 net/wireless/core.c:437
 process_one_work kernel/workqueue.c:2634 [inline]
 process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711
 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792
 kthread+0x2fa/0x390 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/26 12:39 linux-6.6.y dbcb8d8e4163 fb8f743d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan INFO: task hung in blkdev_flush_mapping
* Struck through repros no longer work on HEAD.