mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 23:24:50 +00:00
501e197a02
The st-rng driver uses devres to register itself with the hwrng core,
the driver will be unregistered from hwrng when its device goes out of
scope. This happens after the driver's remove function is called.
However, st-rng's clock is disabled in the remove function. There's a
short timeframe where st-rng is still registered with the hwrng core
although its clock is disabled. I suppose the clock must be active to
access the hardware and serve requests from the hwrng core.
Switch to devm_clk_get_enabled and let devres disable the clock and
unregister the hwrng. This avoids the race condition.
Fixes:
|
||
---|---|---|
.. | ||
agp | ||
hw_random | ||
ipmi | ||
mwave | ||
tpm | ||
xilinx_hwicap | ||
xillybus | ||
adi.c | ||
apm-emulation.c | ||
applicom.c | ||
applicom.h | ||
bsr.c | ||
ds1620.c | ||
dsp56k.c | ||
dtlk.c | ||
hangcheck-timer.c | ||
hpet.c | ||
Kconfig | ||
lp.c | ||
Makefile | ||
mem.c | ||
misc.c | ||
mspec.c | ||
nsc_gpio.c | ||
nvram.c | ||
nwbutton.c | ||
nwbutton.h | ||
nwflash.c | ||
pc8736x_gpio.c | ||
powernv-op-panel.c | ||
ppdev.c | ||
ps3flash.c | ||
random.c | ||
scx200_gpio.c | ||
sonypi.c | ||
tlclk.c | ||
toshiba.c | ||
ttyprintk.c | ||
uv_mmtimer.c | ||
virtio_console.c |