android_kernel_motorola_sm6375/drivers/char
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Martin Kaiser bac502cd47 hwrng: st - keep clock enabled while hwrng is registered
[ Upstream commit 501e197a02d4aef157f53ba3a0b9049c3e52fedc ]

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: 3e75241be8 ("hwrng: drivers - Use device-managed registration API")
Signed-off-by: Martin Kaiser <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2023-07-27 08:37:19 +02:00
..
agp parisc: Flush gatt writes and adjust gatt mask in parisc_agp_mask_memory() 2023-06-21 15:44:09 +02:00
hw_random hwrng: st - keep clock enabled while hwrng is registered 2023-07-27 08:37:19 +02:00
ipmi ipmi: fix SSIF not responding under certain cond. 2023-05-17 11:35:33 +02:00
mwave char/mwave: Adjust io port register size 2022-01-27 09:19:38 +01:00
pcmcia
tpm tpm/tpm_tis: Disable interrupts for more Lenovo devices 2023-05-30 12:44:07 +01:00
xilinx_hwicap
xillybus
adi.c
apm-emulation.c
applicom.c
applicom.h
bsr.c
ds1620.c
dsp56k.c
dtlk.c
efirtc.c
hangcheck-timer.c
hpet.c
Kconfig random: credit cpu and bootloader seeds by default 2022-06-22 14:11:21 +02:00
lp.c
Makefile
mem.c random: restore O_NONBLOCK support 2022-10-15 07:54:40 +02:00
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 random: use expired timer rather than wq for mixing fast pool 2022-10-15 07:54:40 +02:00
raw.c
rtc.c
scx200_gpio.c
sonypi.c
tb0219.c
tlclk.c
toshiba.c
ttyprintk.c
uv_mmtimer.c
virtio_console.c virtio_console: eliminate anonymous module_init & module_exit 2022-04-15 14:18:36 +02:00