"Jason A. Donenfeld" Jason@zx2c4.com writes:
Even though hwrng provides a `wait` parameter, it doesn't work very well when waiting for a long time. There are numerous deadlocks that emerge related to shutdown. Work around this API limitation by waiting for a shorter amount of time and erroring more frequently. This commit also prevents hwrng from splatting messages to dmesg when there's a timeout and switches to using schedule_timeout_interruptible(), so that the kthread can be stopped.
Reported-by: Gregory Erwin gregerwin256@gmail.com Tested-by: Gregory Erwin gregerwin256@gmail.com Cc: Toke Høiland-Jørgensen toke@redhat.com Cc: Kalle Valo kvalo@kernel.org Cc: Rui Salvaterra rsalvaterra@gmail.com Cc: Herbert Xu herbert@gondor.apana.org.au Cc: stable@vger.kernel.org Fixes: fcd09c90c3c5 ("ath9k: use hw_random API instead of directly dumping into random.c") Link: https://lore.kernel.org/all/CAO+Okf6ZJC5-nTE_EJUGQtd8JiCkiEHytGgDsFGTEjs0c00... Link: https://lore.kernel.org/lkml/CAO+Okf5k+C+SE6pMVfPf-d8MfVPVq4PO7EY8Hys_DVXten... Link: https://bugs.archlinux.org/task/75138 Signed-off-by: Jason A. Donenfeld Jason@zx2c4.com
Gregory, care to take this version for a spin as well to double-check that it still resolves the issue? :)
-Toke