Re: [PATCH] hwrng: core - fix task hung in hwrng_fillfn

From: Herbert Xu
Date: Fri Dec 01 2023 - 18:39:03 EST


On Fri, Dec 01, 2023 at 08:34:12PM +0800, Edward Adam Davis wrote:
>
> According to splat, after a page fault occurred, the attempt to retrieve
> rcu_read_lock() failed, resulting in a timeout of 143s. This is my speculation.

Oh I see what's going on. The reproducer is mapping /dev/hwrng, so
the write to user-space is then triggering another read which then
dead-locks.

Let me think about this.

Thanks,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt