Commit bbb8ceb5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull crypto fix from Herbert Xu:
 "This fixes an issue exposed by the recent change to feed untrusted
  sources into /dev/random"

* tag 'v6.1-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  hwrng: bcm2835 - use hwrng_msleep() instead of cpu_relax()
parents 9abf2313 96cb9d05
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ static int bcm2835_rng_read(struct hwrng *rng, void *buf, size_t max,
	while ((rng_readl(priv, RNG_STATUS) >> 24) == 0) {
		if (!wait)
			return 0;
		cpu_relax();
		hwrng_msleep(rng, 1000);
	}

	num_words = rng_readl(priv, RNG_STATUS) >> 24;