1
0
Fork 0
alistair23-linux/drivers/char/hw_random
Prarit Bhargava 8c75704ebc hwrng: geode - Revert managed API changes
After commit e9afc74629 ("hwrng: geode - Use linux/io.h instead of
asm/io.h") the geode-rng driver uses devres with pci_dev->dev to keep
track of resources, but does not actually register a PCI driver.  This
results in the following issues:

1.  The driver leaks memory because the driver does not attach to a
device.  The driver only uses the PCI device as a reference.   devm_*()
functions will release resources on driver detach, which the geode-rng
driver will never do.  As a result,

2.  The driver cannot be reloaded because there is always a use of the
ioport and region after the first load of the driver.

Revert the changes made by  e9afc74629 ("hwrng: geode - Use linux/io.h
instead of asm/io.h").

Cc: <stable@vger.kernel.org>
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Fixes: 6e9b5e7688 ("hwrng: geode - Migrate to managed API")
Cc: Matt Mackall <mpm@selenic.com>
Cc: Corentin LABBE <clabbe.montjoie@gmail.com>
Cc: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>
Cc: linux-crypto@vger.kernel.org
Cc: linux-geode@lists.infradead.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-03-16 17:43:11 +08:00
..
Kconfig hwrng: omap - update Kconfig help description 2017-02-15 13:23:48 +08:00
Makefile hwrng: cavium - Add Cavium HWRNG driver for ThunderX SoC. 2016-08-31 23:00:40 +08:00
amd-rng.c hwrng: amd - Revert managed API changes 2017-03-16 17:43:10 +08:00
atmel-rng.c hwrng: atmel - use clk_disable_unprepare instead of clk_disable 2016-11-17 23:34:57 +08:00
bcm63xx-rng.c hwrng: bcm63xx - fix device tree compilation 2016-04-05 20:23:11 +08:00
bcm2835-rng.c hwrng: bcm2835 - handle of_iomap failures 2016-09-07 21:08:24 +08:00
cavium-rng-vf.c hwrng: cavium - Use per device name to allow for multiple devices. 2017-02-11 17:52:30 +08:00
cavium-rng.c hwrng: cavium - Add Cavium HWRNG driver for ThunderX SoC. 2016-08-31 23:00:40 +08:00
core.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
exynos-rng.c hwrng: exynos - fixup IO accesors 2016-06-13 17:47:50 +08:00
geode-rng.c hwrng: geode - Revert managed API changes 2017-03-16 17:43:11 +08:00
hisi-rng.c hwrng: hisi - Add support for Hisilicon SoC RNG 2016-04-15 22:36:36 +08:00
intel-rng.c hwrng: printk replacement 2014-10-02 14:35:00 +08:00
iproc-rng200.c hwrng: iproc-rng200 - make use of devm_hwrng_register 2015-03-16 21:45:56 +11:00
ixp4xx-rng.c IXP4xx: HW pseudo-random generator is available on IXP45x/46x only. 2012-11-22 03:35:39 +00:00
meson-rng.c hwrng: meson - Remove unneeded platform MODULE_ALIAS 2016-10-25 11:08:25 +08:00
msm-rng.c hwrng: Make explicit that max >= 32 always 2016-11-21 22:50:45 +08:00
mxc-rnga.c hwrng: mxc-rnga - Use the preferred format for kzalloc 2015-09-21 22:00:39 +08:00
n2-asm.S sparc64: Add Niagara2 RNG driver. 2008-07-18 00:46:09 -07:00
n2-drv.c hwrng: n2 - update version info 2017-01-13 18:47:20 +08:00
n2rng.h hwrng: n2 - support new hardware register layout 2017-01-13 18:47:19 +08: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 hwrng: octeon - Use devm_hwrng_register 2015-09-21 22:00:38 +08:00
omap-rng.c hwrng: omap - Do not access INTMASK_REG on EIP76 2017-03-08 14:01:13 +08:00
omap3-rom-rng.c hwrng: omap3-rom - Remove obsoleted functions 2016-08-24 21:04:50 +08:00
pasemi-rng.c hwrng: pasemi - Use linux/io.h instead of asm/io.h 2016-09-13 20:27:21 +08:00
pic32-rng.c hwrng: Make explicit that max >= 32 always 2016-11-21 22:50:45 +08:00
powernv-rng.c char: constify of_device_id array 2015-03-16 21:10:28 +01:00
pseries-rng.c hwrng: Make explicit that max >= 32 always 2016-11-21 22:50:45 +08:00
st-rng.c hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_probe() 2016-09-13 20:27:24 +08:00
stm32-rng.c hwrng: stm32 - fix maybe uninitialized variable warning 2016-05-31 16:41:57 +08:00
timeriomem-rng.c char: hw_random: drop owner assignment from platform_drivers 2014-10-20 16:20:20 +02: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 - Use devm_hwrng_register instead of hwrng_register 2016-08-31 23:00:49 +08:00
via-rng.c x86/fpu: Remove irq_ts_save() and irq_ts_restore() 2016-11-01 07:47:54 +01:00
virtio-rng.c hwrng: virtio - drop extra empty line 2015-01-26 11:34:23 +11:00
xgene-rng.c hwrng: xgene - fix handling platform_get_irq 2015-09-21 22:57:37 +08:00