syzbot


upstream boot error: INFO: task hung in hwrng_register

Status: upstream: reported on 2022/06/04 08:46
Reported-by: syzbot+6da75abeed821109137b@syzkaller.appspotmail.com
Fix commit: 228432551bd8 virtio-rng: make device ready before making request
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 246d, last: 239d
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
INFO: task hung in hwrng_register (2) 21 101d 246d 0/24 closed as dup on 2022/06/10 08:34

Sample crash report:
INFO: task swapper/0:1 blocked for more than 143 seconds.
      Not tainted 5.19.0-rc1-syzkaller-00262-g0885eacdc81f #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:swapper/0       state:D stack:20600 pid:    1 ppid:     0 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5116 [inline]
 __schedule+0x957/0xec0 kernel/sched/core.c:6428
 schedule+0xeb/0x1b0 kernel/sched/core.c:6500
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6559
 __mutex_lock_common+0xecf/0x26c0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
 add_early_randomness drivers/char/hw_random/core.c:69 [inline]
 hwrng_register+0x3bf/0x680 drivers/char/hw_random/core.c:599
 virtrng_scan+0x3e/0x90 drivers/char/hw_random/virtio-rng.c:205
 virtio_dev_probe+0x92e/0xab0 drivers/virtio/virtio.c:312
 call_driver_probe+0x96/0x250
 really_probe+0x220/0x940 drivers/base/dd.c:634
 __driver_probe_device+0x1f4/0x3f0 drivers/base/dd.c:764
 driver_probe_device+0x50/0x240 drivers/base/dd.c:794
 __driver_attach+0x35f/0x5a0 drivers/base/dd.c:1163
 bus_for_each_dev+0x188/0x1f0 drivers/base/bus.c:301
 bus_add_driver+0x32f/0x600 drivers/base/bus.c:618
 driver_register+0x2e9/0x3e0 drivers/base/driver.c:240
 do_one_initcall+0xbd/0x2b0 init/main.c:1295
 do_initcall_level+0x168/0x218 init/main.c:1368
 do_initcalls+0x4b/0x8c init/main.c:1384
 kernel_init_freeable+0x43a/0x5c3 init/main.c:1610
 kernel_init+0x19/0x2b0 init/main.c:1499
 ret_from_fork+0x1f/0x30
 </TASK>

Showing all locks held in the system:
2 locks held by swapper/0/1:
 #0: ffff888146151170 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:835 [inline]
 #0: ffff888146151170 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1054 [inline]
 #0: ffff888146151170 (&dev->mutex){....}-{3:3}, at: __driver_attach+0x353/0x5a0 drivers/base/dd.c:1162
 #1: ffffffff8d24cae8 (reading_mutex){+.+.}-{3:3}, at: add_early_randomness drivers/char/hw_random/core.c:69 [inline]
 #1: ffffffff8d24cae8 (reading_mutex){+.+.}-{3:3}, at: hwrng_register+0x3bf/0x680 drivers/char/hw_random/core.c:599
2 locks held by pr/ttyS0/16:
1 lock held by khungtaskd/29:
 #0: ffffffff8cb1ebe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by kworker/u4:4/56:
 #0: ffff888011c69138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x796/0xd10 kernel/workqueue.c:2262
 #1: ffffc90001577d00 ((work_completion)(&(&kfence_timer)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0xd10 kernel/workqueue.c:2264
1 lock held by hwrng/755:
 #0: ffffffff8d24cae8 (reading_mutex){+.+.}-{3:3}, at: hwrng_fillfn+0xec/0x470 drivers/char/hw_random/core.c:503

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


Crashes (23):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce-smack-root 2022/06/11 09:01 upstream 0885eacdc81f 0d5abf15 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/10 19:17 upstream fe43c0188911 0d5abf15 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/10 19:17 upstream fe43c0188911 0d5abf15 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/10 11:48 upstream 874c8ca1e60b 0d5abf15 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/10 11:48 upstream 874c8ca1e60b 0d5abf15 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/10 01:51 upstream 874c8ca1e60b 0d5abf15 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/10 01:51 upstream 874c8ca1e60b 0d5abf15 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/09 04:45 upstream 6bfb56e93bce b2706118 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/08 14:22 upstream 9886142c7a22 b2706118 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/08 00:58 upstream 9886142c7a22 b2706118 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/08 00:58 upstream 9886142c7a22 b2706118 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/08 00:58 upstream 9886142c7a22 b2706118 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/07 23:18 upstream 9886142c7a22 c8857892 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/07 23:18 upstream 9886142c7a22 c8857892 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/07 02:06 upstream e71e60cd74df c8857892 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/06 07:00 upstream f2906aa86338 c8857892 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/05 17:40 upstream 44688ffd111a c8857892 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/05 03:04 upstream d0e60d46bc03 c8857892 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/05 03:04 upstream d0e60d46bc03 c8857892 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/04 03:24 upstream 032dcf09e2bf c8857892 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/04 01:55 upstream 1f952675835b c8857892 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/04 01:55 upstream 1f952675835b c8857892 .config console log report upstream boot error: INFO: task hung in hwrng_register
ci-upstream-kasan-gce-smack-root 2022/06/04 01:55 upstream 1f952675835b c8857892 .config console log report upstream boot error: INFO: task hung in hwrng_register
* Struck through repros no longer work on HEAD.