Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Dec 2019 01:40:59 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356195 - head/sys/dev/virtio/random
Message-ID:  <201912300140.xBU1exFk065548@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912300140.xBU1exFk065548>