[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110115004416.GA19686@gondor.apana.org.au>
Date: Sat, 15 Jan 2011 11:44:16 +1100
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Jamie Iles <jamie@...ieiles.com>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Matt Mackall <mpm@...enic.com>
Subject: Re: [PATCHv2] hwrng: add support for picoxcell TRNG
On Fri, Jan 14, 2011 at 06:44:21PM +0000, Jamie Iles wrote:
>
> + /* Wait for some data to become available. */
> + while (__raw_readl(csr) & CSR_OUT_EMPTY_MASK) {
> + if (!wait)
> + return 0;
> + cpu_relax();
> + }
This has the potential to loop indefinitely. Please add a time-out
to prevent that (see existing RNG drivers for example).
Thanks!
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists