alistair23-linux/drivers/char/hw_random
Amit Shah e052dbf554 hwrng: virtio - ensure reads happen after successful probe
The hwrng core asks for random data in the hwrng_register() call itself
from commit d9e7972619.  This doesn't play well with virtio -- the
DRIVER_OK bit is only set by virtio core on a successful probe, and
we're not yet out of our probe routine when this call is made.  This
causes the host to not acknowledge any requests we put in the virtqueue,
and the insmod or kernel boot process just waits for data to arrive from
the host, which never happens.

CC: Kees Cook <keescook@chromium.org>
CC: Jason Cooper <jason@lakedaemon.net>
CC: Herbert Xu <herbert@gondor.apana.org.au>
CC: <stable@vger.kernel.org> # For v3.15+
Reviewed-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2014-07-14 20:48:17 +08:00
..
amd-rng.c hwrng: amd - manage resource allocation 2011-05-04 15:13:15 +10:00
atmel-rng.c hwrng: atmel - Use devm_clk_get() 2014-03-10 20:13:35 +08:00
bcm63xx-rng.c hwrng: bcm63xx - remove unnecessary platform_set_drvdata() 2013-05-24 17:55:29 +08:00
bcm2835-rng.c hwrng: bcm2835 - fix oops when rng h/w is accessed during registration 2014-04-11 11:31:13 +08:00
core.c hwrng: virtio - ensure reads happen after successful probe 2014-07-14 20:48:17 +08:00
exynos-rng.c drivers/char: delete non-required instances of include <linux/init.h> 2014-02-07 15:10:19 -08:00
geode-rng.c hwrng: Use PCI_VDEVICE 2009-06-25 13:50:53 +08:00
intel-rng.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ixp4xx-rng.c IXP4xx: HW pseudo-random generator is available on IXP45x/46x only. 2012-11-22 03:35:39 +00:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6 into next 2014-06-07 19:44:40 -07:00
Makefile hwrng: picoxcell - remove unbuildable picoxcell TRNG 2014-04-16 20:40:18 +08:00
msm-rng.c hwrng: msm - Add PRNG support for MSM SoC's 2013-10-30 12:02:56 +08:00
mxc-rnga.c hwrng: mxc-rnga - Check the return value from clk_prepare_enable() 2013-08-01 10:53:59 +10:00
n2-asm.S sparc64: Add Niagara2 RNG driver. 2008-07-18 00:46:09 -07:00
n2-drv.c hwrng: n2-drv - Introduce the use of the managed version of kzalloc 2014-05-13 19:43:48 +08:00
n2rng.h n2rng: Attach on Niagara-T3. 2011-07-28 01:26:30 -07:00
nomadik-rng.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2014-04-03 09:28:16 -07:00
octeon-rng.c drivers/char: delete non-required instances of include <linux/init.h> 2014-02-07 15:10:19 -08:00
omap-rng.c hwrng: omap - remove unnecessary OOM messages 2014-05-08 21:58:16 +08:00
omap3-rom-rng.c hwrng: omap3-rom - Use devm_clk_get() 2014-03-10 20:13:36 +08:00
pasemi-rng.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
powernv-rng.c hwrng: Add a driver for the hwrng found in power7+ systems 2013-10-11 16:50:20 +11:00
ppc4xx-rng.c powerpc: add missing explicit OF includes for ppc 2013-11-11 09:10:50 -06:00
pseries-rng.c hwrng: Return errors to upper levels in pseries-rng.c 2013-10-11 16:50:18 +11:00
timeriomem-rng.c hwrng: timeriomem - remove unnecessary OOM messages 2014-05-08 21:58:16 +08:00
tpm-rng.c hw_random: add support for the TPM chip as a hardware RNG source 2012-08-22 11:11:41 -05:00
tx4939-rng.c hwrng: tx4939 - simplify use of devm_ioremap_resource 2013-08-14 20:42:04 +10:00
via-rng.c hwrng: via-rng - Mark device ID table as __maybe_unused 2013-09-13 21:43:53 +10:00
virtio-rng.c hwrng: virtio - ensure reads happen after successful probe 2014-07-14 20:48:17 +08:00