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()
Unified · Split
| @@ -71,7 +71,7 @@ static int bcm2835_rng_read(struct hwrng *rng, void *buf, size_t max, · 70 unmodified lines | |||
| 71 | while ((rng_readl(priv, RNG_STATUS) >> 24) == 0) { | 71 | while ((rng_readl(priv, RNG_STATUS) >> 24) == 0) { |
| 72 | if (!wait) | 72 | if (!wait) |
| 73 | return 0; | 73 | return 0; |
| 74 | cpu_relax(); | 74 | hwrng_msleep(rng, 1000); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | num_words = rng_readl(priv, RNG_STATUS) >> 24; | 77 | num_words = rng_readl(priv, RNG_STATUS) >> 24; |