]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
virtio_random(8): avoid deadlock at shutdown time
authorEugene Grosbein <eugen@FreeBSD.org>
Wed, 16 Mar 2022 04:41:51 +0000 (11:41 +0700)
committerEugene Grosbein <eugen@FreeBSD.org>
Wed, 16 Mar 2022 04:41:51 +0000 (11:41 +0700)
commitadbf7727b3a2aad3c2faa6e543ee7fa7a6c9a3d5
tree60376b342ee3643732b11f7c1bde8aa5594181a8
parented5d6089113cac259202a28f2e1f89727c4d6ea3
virtio_random(8): avoid deadlock at shutdown time

FreeBSD 13+ running as virtual guest may load virtio_random(8) driver
by means of devd(8) unless the driver is blacklisted or disabled
via device.hints(5). Currently, the driver may prevent
the system from rebooting or shutting down correctly.

This change deactivates virtio_random at very late stage
during system shutdown sequence to avoid deadlock
that results in kernel hang.

PR: 253175
Tested by: tom
MFC after: 3 days
sys/dev/virtio/random/virtio_random.c