linux-stable/drivers/char
Amit Shah 5c06273401 virtio: rng: delay hwrng_register() till driver is ready
Instead of calling hwrng_register() in the probe routing, call it in the
scan routine.  This ensures that when hwrng_register() is successful,
and it requests a few random bytes to seed the kernel's pool at init,
we're ready to service that request.

This will also enable us to remove the workaround added previously to
check whether probe was completed, and only then ask for data from the
host.  The revert follows in the next commit.

There's a slight behaviour change here on unsuccessful hwrng_register().
Previously, when hwrng_register() failed, the probe() routine would
fail, and the vqs would be torn down, and driver would be marked not
initialized.  Now, the vqs will remain initialized, driver would be
marked initialized as well, but won't be available in the list of RNGs
available to hwrng core.  To fix the failures, the procedure remains the
same, i.e. unload and re-load the module, and hope things succeed the
next time around.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2014-07-27 21:07:19 +09:30
..
agp agp: info leak in agpioc_info_wrap() 2014-05-06 13:05:00 -07:00
hw_random virtio: rng: delay hwrng_register() till driver is ready 2014-07-27 21:07:19 +09:30
ipmi Merge branch 'sched/urgent' into sched/core, to avoid conflicts 2014-05-07 13:15:46 +02:00
mwave drivers/char: delete non-required instances of include <linux/init.h> 2014-02-07 15:10:19 -08:00
pcmcia tty: Fix help text of SYNCLINK_CS 2014-04-16 14:31:13 -07:00
tpm Merge branch 'acpica' 2014-06-03 23:12:27 +02:00
xilinx_hwicap char: hwicap: Remove unnecessary dev_set_drvdata() 2013-10-03 16:03:31 -07:00
apm-emulation.c apm-emulation: add hibernation APM events to support suspend2disk 2014-01-07 13:50:28 +01:00
applicom.c applicom: dereferencing NULL on error path 2014-05-27 17:43:12 -07:00
applicom.h
bfin-otp.c
bsr.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
ds1302.c
ds1620.c ds1620: single_open() leak 2013-05-05 00:11:29 -04:00
dsp56k.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
dtlk.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
efirtc.c rtc: single_open() leaks 2013-05-05 00:12:29 -04:00
generic_nvram.c
genrtc.c rtc: single_open() leaks 2013-05-05 00:12:29 -04:00
hangcheck-timer.c
hpet.c ACPI: Clean up inclusions of ACPI header files 2013-12-07 01:03:14 +01:00
i8k.c i8k: Fix non-SMP operation 2014-07-09 16:45:36 -07:00
Kconfig ttyprintk: Allow built as a module 2014-04-16 14:21:06 -07:00
lp.c char: Int overflow in lp_do_ioctl(). 2013-12-18 16:39:54 -08:00
Makefile Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-01-29 20:49:12 -08:00
mbcs.c
mbcs.h
mem.c /dev/mem: handle out-of-bounds read/write 2014-02-15 11:51:02 -08:00
misc.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-11-13 15:34:18 +09:00
mmtimer.c
msm_smd_pkt.c treewide: Fix typos in printk 2013-12-19 15:10:49 +01:00
mspec.c char: Use vma_pages() to replace (vm_end - vm_start) >> PAGE_SHIFT 2013-05-21 10:07:54 -07:00
nsc_gpio.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
nvram.c
nwbutton.c char: nwbutton: open-code interruptible_sleep_on 2014-01-08 15:29:52 -08:00
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ps3flash.c ps3flash: switch to generic_file_llseek_size() 2013-06-29 12:57:33 +04:00
random.c random: check for increase of entropy_count because of signed conversion 2014-07-19 01:42:13 -04:00
raw.c blkdev_aio_write() - turn into blkdev_write_iter() 2014-05-06 17:38:01 -04:00
rtc.c various char drivers: remove deprecated IRQF_DISABLED 2013-10-16 12:36:10 -07:00
scx200_gpio.c
snsc.c various char drivers: remove deprecated IRQF_DISABLED 2013-10-16 12:36:10 -07:00
snsc.h
snsc_event.c various char drivers: remove deprecated IRQF_DISABLED 2013-10-16 12:36:10 -07:00
sonypi.c ACPI: Remove the old /proc/acpi/event interface 2013-07-15 13:56:36 +02:00
tb0219.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
tile-srom.c drivers/char: delete non-required instances of include <linux/init.h> 2014-02-07 15:10:19 -08:00
tlclk.c tlclk: remove deprecated IRQF_DISABLED 2013-10-16 12:36:10 -07:00
toshiba.c
ttyprintk.c ttyprintk: Allow built as a module 2014-04-16 14:21:06 -07:00
uv_mmtimer.c
virtio_console.c virtio: console: remove unnecessary null test before debugfs_remove_recursive 2014-07-27 21:07:14 +09:30