mirror of https://github.com/torvalds/linux.git
enable_best_rng() is used in hwrng_unregister() to switch away from the currently active RNG, if that is the one currently being removed. However enable_best_rng() might fail, if the next RNG's init routine fails. In that case enable_best_rng() will return an error code and the currently active RNG will remain active. After unregistering this might lead to crashes due to use-after-free. Fix this by dropping the currently active RNG, if enable_best_rng() failed. This will result in no RNG to be active, if the next-best one failed to initialize. This problem was introduced by |
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| amd-rng.c | ||
| atmel-rng.c | ||
| bcm2835-rng.c | ||
| cavium-rng-vf.c | ||
| cavium-rng.c | ||
| core.c | ||
| exynos-trng.c | ||
| geode-rng.c | ||
| hisi-rng.c | ||
| imx-rngc.c | ||
| intel-rng.c | ||
| iproc-rng200.c | ||
| ixp4xx-rng.c | ||
| ks-sa-rng.c | ||
| meson-rng.c | ||
| msm-rng.c | ||
| mtk-rng.c | ||
| mxc-rnga.c | ||
| n2-asm.S | ||
| n2-drv.c | ||
| n2rng.h | ||
| nomadik-rng.c | ||
| octeon-rng.c | ||
| omap-rng.c | ||
| omap3-rom-rng.c | ||
| pasemi-rng.c | ||
| pic32-rng.c | ||
| powernv-rng.c | ||
| pseries-rng.c | ||
| s390-trng.c | ||
| st-rng.c | ||
| stm32-rng.c | ||
| timeriomem-rng.c | ||
| tx4939-rng.c | ||
| via-rng.c | ||
| virtio-rng.c | ||
| xgene-rng.c | ||