syzbot


INFO: task hung in hwrng_fillfn

Status: upstream: reported on 2024/02/01 14:43
Reported-by: syzbot+485e4ccc230b3879d374@syzkaller.appspotmail.com
First crash: 95d, last: 95d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: task hung in hwrng_fillfn 4 100d 203d 0/3 auto-obsoleted due to no activity on 2024/05/07 11:12
upstream INFO: task hung in hwrng_fillfn crypto C error 27 100d 164d 26/26 fixed on 2024/01/30 15:47

Sample crash report:
INFO: task hwrng:902 blocked for more than 143 seconds.
      Not tainted 5.15.148-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:hwrng           state:D stack:27768 pid:  902 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5030 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6376
 schedule+0x11b/0x1f0 kernel/sched/core.c:6459
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6518
 __mutex_lock_common+0xe34/0x25a0 kernel/locking/mutex.c:669
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 hwrng_fillfn+0xdd/0x280 drivers/char/hw_random/core.c:436
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91f220 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
1 lock held by hwrng/902:
 #0: ffffffff8cff8348 (reading_mutex){+.+.}-{3:3}, at: hwrng_fillfn+0xdd/0x280 drivers/char/hw_random/core.c:436
2 locks held by getty/3261:
 #0: ffff888025403098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc9000209b2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
1 lock held by syz-executor.0/3540:
 #0: ffffffff8c9237e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:322 [inline]
 #0: ffffffff8c9237e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x350/0x740 kernel/rcu/tree_exp.h:845
3 locks held by kworker/1:8/18252:
 #0: ffff888011c70d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc900040f7d20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8c9237e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline]
 #2: ffffffff8c9237e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x280/0x740 kernel/rcu/tree_exp.h:845
2 locks held by kworker/1:12/18257:
 #0: ffff888011c72538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc9000417fd20 ((work_completion)(&rew.rew_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
5 locks held by kworker/u5:0/31281:
 #0: ffff888078756938 ((wq_completion)hci3){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc900050f7d20 ((work_completion)(&hdev->error_reset)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffff888076248ff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 net/bluetooth/hci_core.c:1737
 #3: ffff888076248078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x431/0x1070 net/bluetooth/hci_core.c:1782
 #4: ffffffff8db252a8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1522 [inline]
 #4: ffffffff8db252a8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xb8/0x220 net/bluetooth/hci_conn.c:1622
2 locks held by kworker/u4:8/7246:
1 lock held by syz-executor.3/11124:
2 locks held by syz-executor.3/11128:
1 lock held by syz-executor.2/13707:
2 locks held by syz-executor.1/13710:

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.15.148-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 13710 Comm: syz-executor.1 Not tainted 5.15.148-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
RIP: 0010:check_wait_context kernel/locking/lockdep.c:4694 [inline]
RIP: 0010:__lock_acquire+0x5fa/0x1ff0 kernel/locking/lockdep.c:4962
Code: 24 08 45 84 f6 0f 84 0c 04 00 00 0f b6 1b 48 8b 44 24 38 0f b6 04 10 84 c0 0f 85 6b 12 00 00 41 f6 47 01 80 0f 85 ed 03 00 00 <84> db 41 0f b6 c6 0f b6 f3 0f 44 f0 89 74 24 54 48 8b 44 24 40 0f
RSP: 0018:ffffc90003e17180 EFLAGS: 00000046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88801b894670
RDX: dffffc0000000000 RSI: 0000000000000008 RDI: ffffffff8fbd00d0
RBP: 000000000000000a R08: dffffc0000000000 R09: fffffbfff1f7a01b
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000002
R13: ffff88801b894668 R14: 0000000000000002 R15: ffff88801b8946e0
FS:  00007fe2f0e216c0(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020173030 CR3: 000000002a960000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/01 14:42 linux-5.15.y 6139f2a02fe0 81024119 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in hwrng_fillfn
* Struck through repros no longer work on HEAD.