aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2019-12-30 01:40:59 +0000
committerConrad Meyer <cem@FreeBSD.org>2019-12-30 01:40:59 +0000
commit9b31a8daad1ac57a167b415610beb692c1ae3beb (patch)
tree1a6334d988326ea6d9a68e9dc6529f7a44582ed4
parent374c99911ee45c5d2ddd42bc6bcf711a8a66b07e (diff)
downloadsrc-9b31a8daad1ac57a167b415610beb692c1ae3beb.tar.gz
src-9b31a8daad1ac57a167b415610beb692c1ae3beb.zip
virtio_random(4): Drop no longer needed unload kludge
After r356194, source deregistration no longer races with concurrent use. Reviewed by: bryanv, markm Differential Revision: https://reviews.freebsd.org/D22490
Notes
Notes: svn path=/head/; revision=356195
-rw-r--r--sys/dev/virtio/random/virtio_random.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/sys/dev/virtio/random/virtio_random.c b/sys/dev/virtio/random/virtio_random.c
index ceda889ca2d7..bafa8a59dbe7 100644
--- a/sys/dev/virtio/random/virtio_random.c
+++ b/sys/dev/virtio/random/virtio_random.c
@@ -176,14 +176,6 @@ vtrnd_detach(device_t dev)
random_source_deregister(&random_vtrnd);
atomic_store_explicit(&g_vtrnd_softc, NULL, memory_order_release);
-
- /*
- * Unfortunately, deregister does not guarantee our source callback
- * will not be invoked after it returns. Use a kludge to prevent some,
- * but not all, possible races.
- */
- tsleep_sbt(&g_vtrnd_softc, 0, "vtrnddet", mstosbt(50), 0, C_HARDCLOCK);
-
return (0);
}