svn commit: r356195 - head/sys/dev/virtio/random

Conrad Meyer cem at FreeBSD.org
Mon Dec 30 01:41:00 UTC 2019


Author: cem
Date: Mon Dec 30 01:40:59 2019
New Revision: 356195
URL: https://svnweb.freebsd.org/changeset/base/356195

Log:
  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

Modified:
  head/sys/dev/virtio/random/virtio_random.c

Modified: head/sys/dev/virtio/random/virtio_random.c
==============================================================================
--- head/sys/dev/virtio/random/virtio_random.c	Mon Dec 30 01:38:19 2019	(r356194)
+++ head/sys/dev/virtio/random/virtio_random.c	Mon Dec 30 01:40:59 2019	(r356195)
@@ -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);
 }
 


More information about the svn-src-head mailing list